Compare commits

...

3 Commits

Author SHA1 Message Date
Max 28b86dfb11
Merge 26c34b4cb7 into 50fcf9b670 2025-07-23 15:21:22 +02:00
MagicPig 50fcf9b670
fix boundary value bug when objTime ends in whole seconds (without sub-second) (#21419)
VulnCheck / Analysis (push) Waiting to run Details
2025-07-23 05:36:06 -07:00
Harshavardhana 64f5c6103f
wait for metadata reads on minDisks+1 for HEAD/GET when data==parity (#21449)
fixes a regression since #19741
2025-07-23 04:21:15 -07:00
2 changed files with 8 additions and 1 deletions

View File

@ -828,6 +828,13 @@ func (er erasureObjects) getObjectFileInfo(ctx context.Context, bucket, object s
minDisks = er.setDriveCount - er.defaultParityCount
}
if minDisks == er.setDriveCount/2 {
// when data and parity are same we must atleast
// wait for response from 1 extra drive to avoid
// split-brain.
minDisks++
}
calcQuorum := func(metaArr []FileInfo, errs []error) (FileInfo, []FileInfo, []StorageAPI, time.Time, string, error) {
readQuorum, _, err := objectQuorumFromMeta(ctx, metaArr, errs, er.defaultParityCount)
if err != nil {

View File

@ -331,7 +331,7 @@ func checkPreconditions(ctx context.Context, w http.ResponseWriter, r *http.Requ
func ifModifiedSince(objTime time.Time, givenTime time.Time) bool {
// The Date-Modified header truncates sub-second precision, so
// use mtime < t+1s instead of mtime <= t to check for unmodified.
return objTime.After(givenTime.Add(1 * time.Second))
return !objTime.Before(givenTime.Add(1 * time.Second))
}
// canonicalizeETag returns ETag with leading and trailing double-quotes removed,