[Box Backup-commit] COMMIT r3431 - in box/trunk: bin/bbackupd lib/backupclient
subversion at boxbackup.org
subversion at boxbackup.org
Wed Dec 3 14:00:16 GMT 2014
Author: chris
Date: 2014-12-03 14:00:16 +0000 (Wed, 03 Dec 2014)
New Revision: 3431
Modified:
box/trunk/bin/bbackupd/BackupDaemon.cpp
box/trunk/bin/bbackupd/BackupDaemon.h
box/trunk/lib/backupclient/BackupDaemonConfigVerify.cpp
Log:
Allow users to configure the delay before retry on backup errors.
Modified: box/trunk/bin/bbackupd/BackupDaemon.cpp
===================================================================
--- box/trunk/bin/bbackupd/BackupDaemon.cpp 2014-12-03 13:41:59 UTC (rev 3430)
+++ box/trunk/bin/bbackupd/BackupDaemon.cpp 2014-12-03 14:00:16 UTC (rev 3431)
@@ -533,6 +533,7 @@
// How often to connect to the store (approximate)
mUpdateStoreInterval = SecondsToBoxTime(
conf.GetKeyValueInt("UpdateStoreInterval"));
+ mBackupErrorDelay = conf.GetKeyValueInt("BackupErrorDelay");
// But are we connecting automatically?
bool automaticBackup = conf.GetKeyValueBool("AutomaticBackup");
@@ -784,7 +785,7 @@
"), reset state and waiting to retry...");
::sleep(10);
mNextSyncTime = GetCurrentBoxTime() +
- SecondsToBoxTime(BACKUP_ERROR_RETRY_SECONDS) +
+ SecondsToBoxTime(mBackupErrorDelay) +
Random::RandomInt(mUpdateStoreInterval >>
SYNC_PERIOD_RANDOM_EXTRA_TIME_SHIFT_BY);
}
Modified: box/trunk/bin/bbackupd/BackupDaemon.h
===================================================================
--- box/trunk/bin/bbackupd/BackupDaemon.h 2014-12-03 13:41:59 UTC (rev 3430)
+++ box/trunk/bin/bbackupd/BackupDaemon.h 2014-12-03 14:00:16 UTC (rev 3431)
@@ -226,7 +226,8 @@
bool mStorageLimitExceeded;
bool mReadErrorsOnFilesystemObjects;
box_time_t mLastSyncTime, mNextSyncTime;
- box_time_t mCurrentSyncStartTime, mUpdateStoreInterval;
+ box_time_t mCurrentSyncStartTime, mUpdateStoreInterval,
+ mBackupErrorDelay;
TLSContext mTlsContext;
bool mDeleteStoreObjectInfoFile;
bool mDoSyncForcedByPreviousSyncError;
Modified: box/trunk/lib/backupclient/BackupDaemonConfigVerify.cpp
===================================================================
--- box/trunk/lib/backupclient/BackupDaemonConfigVerify.cpp 2014-12-03 13:41:59 UTC (rev 3430)
+++ box/trunk/lib/backupclient/BackupDaemonConfigVerify.cpp 2014-12-03 14:00:16 UTC (rev 3431)
@@ -11,6 +11,7 @@
#include "BackupDaemonConfigVerify.h"
#include "Daemon.h"
#include "BoxPortsAndFiles.h"
+#include "BackupConstants.h"
#include "MemLeakFindOn.h"
@@ -68,6 +69,8 @@
ConfigTest_Exists | ConfigTest_IsUint32),
ConfigurationVerifyKey("UpdateStoreInterval",
ConfigTest_Exists | ConfigTest_IsInt),
+ ConfigurationVerifyKey("BackupErrorDelay",
+ ConfigTest_Exists | ConfigTest_IsInt, BACKUP_ERROR_RETRY_SECONDS),
ConfigurationVerifyKey("MinimumFileAge",
ConfigTest_Exists | ConfigTest_IsInt),
ConfigurationVerifyKey("MaxUploadWait",
More information about the Boxbackup-commit
mailing list