You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnfalse, 0, errors.Errorf("watermark value %s must be a integer number in range [0, 100]. Refer to parameter page for details: https://docs.pelicanplatform.org/parameters#Cache-HighWatermark", wmStr)
635
-
}
636
-
returntrue, int64(wmNum), nil
637
-
// Not an integer number, check if it's in form of <int>k|m|g|t
638
-
} else {
639
-
iflen(wmStr) <1 {
640
-
returnfalse, 0, errors.Errorf("watermark value %s is empty.", wmStr)
641
-
}
642
-
unit:=wmStr[len(wmStr)-1]
643
-
ifslices.Contains(watermarkUnits, unit) {
644
-
byteNum, err:=strconv.Atoi(wmStr[:len(wmStr)-1])
645
-
// Bytes portion is not an integer
646
-
iferr!=nil {
647
-
returnfalse, 0, errors.Errorf("watermark value %s is neither a percentage integer (e.g. 95) or a valid bytes. Refer to parameter page for details: https://docs.pelicanplatform.org/parameters#Cache-HighWatermark", wmStr)
returnfalse, 0, errors.Errorf("watermark value %s is neither a percentage integer (e.g. 95) or a valid byte. Bytes representation is missing unit (k|m|g|t). Refer to parameter page for details: https://docs.pelicanplatform.org/parameters#Cache-HighWatermark", wmStr)
660
-
}
661
-
}
662
-
} else {
663
-
// Doesn't contain k|m|g|t suffix
664
-
returnfalse, 0, errors.Errorf("watermark value %s is neither a percentage integer (e.g. 95) or a valid byte. Bytes representation is missing unit (k|m|g|t). Refer to parameter page for details: https://docs.pelicanplatform.org/parameters#Cache-HighWatermark", wmStr)
returnerrors.New("If any of Cache parameters 'FilesBaseSize', 'FilesNominalSize', or 'FilesMaxSize' is set, all three must be set")
1343
1319
}
1344
-
iflowWmNum>=highWmNum {
1345
-
returnfmt.Errorf("invalid Cache.HighWaterMark and Cache.LowWatermark values. Cache.HighWaterMark must be greater than Cache.LowWaterMark. Got %s, %s", highWmStr, lowWmStr)
1320
+
1321
+
varbase, nominal, maxfloat64
1322
+
varerrerror
1323
+
// Watermark validation will error if these parameters are not absolute, so we can ignore that output
0 commit comments