@@ -136,11 +136,9 @@ func (a *Archiver) persistBlobsForBlockToS3(ctx context.Context, blockIdentifier
136
136
return currentHeader .Data , exists , nil
137
137
}
138
138
139
- const (
140
- LockUpdateInterval = 10 * time .Second
141
- ObtainLockRetryInterval = 10 * time .Second
142
- LockTimeout = int64 (20 ) // 20 seconds
143
- )
139
+ const LockUpdateInterval = 10 * time .Second
140
+ const LockTimeout = int64 (20 ) // 20 seconds
141
+ var ObtainLockRetryInterval = 10 * time .Second
144
142
145
143
func (a * Archiver ) waitObtainStorageLock (ctx context.Context ) {
146
144
lockfile , err := a .dataStoreClient .ReadLockfile (ctx )
@@ -153,7 +151,10 @@ func (a *Archiver) waitObtainStorageLock(ctx context.Context) {
153
151
if lockfile != emptyLockfile {
154
152
for lockfile .ArchiverId != a .id && lockfile .Timestamp + LockTimeout > currentTime {
155
153
// Loop until the timestamp read from storage is expired
156
- a .log .Info ("attempting to obtain storage lock" )
154
+ a .log .Info ("waiting for storage lock timestamp to expire" ,
155
+ "timestamp" , strconv .FormatInt (lockfile .Timestamp , 10 ),
156
+ "currentTime" , strconv .FormatInt (currentTime , 10 ),
157
+ )
157
158
time .Sleep (ObtainLockRetryInterval )
158
159
lockfile , err = a .dataStoreClient .ReadLockfile (ctx )
159
160
if err != nil {
0 commit comments