Increase delay
This commit is contained in:
@@ -27,8 +27,9 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
slowUploadThreshold = 2 * time.Second
|
||||
slowSpeedThreshold = 0.5 // MB/s
|
||||
slowUploadThreshold = 2 * time.Second
|
||||
slowSpeedThreshold = 0.5 // MB/s
|
||||
replicationDelayForStaleObjects = 30
|
||||
)
|
||||
|
||||
// ReplicationController3 oversees version 3 of our object replication.
|
||||
@@ -251,11 +252,11 @@ func (c *ReplicationController3) tryReplicate() error {
|
||||
}
|
||||
|
||||
if strings.Contains(err.Error(), "size of the uploaded file") {
|
||||
delayErr := c.ObjectCopiesRepo.DelayNextAttemptByDays(context.Background(), objectKey, 7)
|
||||
delayErr := c.ObjectCopiesRepo.DelayNextAttemptByDays(context.Background(), objectKey, replicationDelayForStaleObjects)
|
||||
if delayErr != nil {
|
||||
logger.WithError(delayErr).Error("Failed to delay next attempt by 7 days")
|
||||
logger.WithError(delayErr).Error("Failed to delay next attempt")
|
||||
} else {
|
||||
discordAlert := fmt.Sprintf("🔥 Size mismatch for object %s, failed to delay next attempt by 7 days", objectKey)
|
||||
discordAlert := fmt.Sprintf("🔥 Size mismatch for object %s, deferred next attemp for %d days", objectKey, replicationDelayForStaleObjects)
|
||||
c.notifyDiscord(discordAlert)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user