fix: replication regression due to proxying requests (#11356)

In PR #11165 due to incorrect proxying for 2 
way replication even when the object was not 
yet replicated

Additionally, fix metadata comparisons when
deciding to do full replication vs metadata copy.

fixes #11340
This commit is contained in:
Poorna Krishnamoorthy
2021-01-27 11:22:34 -08:00
committed by GitHub
parent e019f21bda
commit fd3f02637a
8 changed files with 76 additions and 33 deletions

View File

@@ -36,7 +36,7 @@ import (
)
const (
defaultHealthCheckDuration = 60 * time.Second
defaultHealthCheckDuration = 100 * time.Second
)
// BucketTargetSys represents bucket targets subsystem
@@ -461,10 +461,10 @@ func (tc *TargetClient) healthCheck() {
_, err := tc.BucketExists(GlobalContext, tc.bucket)
if err != nil {
atomic.StoreInt32(&tc.up, 0)
time.Sleep(tc.healthCheckDuration * time.Second)
time.Sleep(tc.healthCheckDuration)
continue
}
atomic.StoreInt32(&tc.up, 1)
time.Sleep(tc.healthCheckDuration * time.Second)
time.Sleep(tc.healthCheckDuration)
}
}