change Read* calls over net/http to move to http.MethodGet (#20173)

- ReadVersion
- ReadFile
- ReadXL

Further changes include to

- Compact internode resource RPC paths
- Compact internode query params

To optimize on parsing by gorilla/mux as the
length of this string increases latency in
gorilla/mux - reduce to a meaningful string.
This commit is contained in:
Harshavardhana
2024-07-29 01:00:12 -07:00
committed by GitHub
parent c87a489514
commit 3ae104edae
3 changed files with 68 additions and 74 deletions
+35 -35
View File
@@ -20,7 +20,7 @@ package cmd
//go:generate msgp -file $GOFILE -unexported
const (
storageRESTVersion = "v60" // ReadFileStream now uses http.MethodGet
storageRESTVersion = "v61" // Move all Read* calls to http.MethodGet, compact handlers and query params fields
storageRESTVersionPrefix = SlashSeparator + storageRESTVersion
storageRESTPrefix = minioReservedBucketPath + "/storage"
)
@@ -28,48 +28,48 @@ const (
const (
storageRESTMethodHealth = "/health"
storageRESTMethodAppendFile = "/appendfile"
storageRESTMethodCreateFile = "/createfile"
storageRESTMethodWriteAll = "/writeall"
storageRESTMethodReadVersion = "/readversion"
storageRESTMethodReadXL = "/readxl"
storageRESTMethodReadAll = "/readall"
storageRESTMethodReadFile = "/readfile"
storageRESTMethodReadFileStream = "/readfilestream"
storageRESTMethodListDir = "/listdir"
storageRESTMethodDeleteVersions = "/deleteverions"
storageRESTMethodRenameFile = "/renamefile"
storageRESTMethodVerifyFile = "/verifyfile"
storageRESTMethodStatInfoFile = "/statfile"
storageRESTMethodReadMultiple = "/readmultiple"
storageRESTMethodCleanAbandoned = "/cleanabandoned"
storageRESTMethodAppendFile = "/afile"
storageRESTMethodCreateFile = "/cfile"
storageRESTMethodWriteAll = "/wall"
storageRESTMethodReadVersion = "/rver"
storageRESTMethodReadXL = "/rxl"
storageRESTMethodReadAll = "/rall"
storageRESTMethodReadFile = "/rfile"
storageRESTMethodReadFileStream = "/rfilest"
storageRESTMethodListDir = "/ls"
storageRESTMethodDeleteVersions = "/dvers"
storageRESTMethodRenameFile = "/rfile"
storageRESTMethodVerifyFile = "/vfile"
storageRESTMethodStatInfoFile = "/sfile"
storageRESTMethodReadMultiple = "/rmpl"
storageRESTMethodCleanAbandoned = "/cln"
)
const (
storageRESTVolume = "volume"
storageRESTVolumes = "volumes"
storageRESTDirPath = "dir-path"
storageRESTFilePath = "file-path"
storageRESTVersionID = "version-id"
storageRESTReadData = "read-data"
storageRESTHealing = "healing"
storageRESTTotalVersions = "total-versions"
storageRESTSrcVolume = "source-volume"
storageRESTSrcPath = "source-path"
storageRESTDstVolume = "destination-volume"
storageRESTDstPath = "destination-path"
storageRESTVolume = "vol"
storageRESTVolumes = "vols"
storageRESTDirPath = "dpath"
storageRESTFilePath = "fp"
storageRESTVersionID = "vid"
storageRESTHealing = "heal"
storageRESTTotalVersions = "tvers"
storageRESTSrcVolume = "svol"
storageRESTSrcPath = "spath"
storageRESTDstVolume = "dvol"
storageRESTDstPath = "dpath"
storageRESTOffset = "offset"
storageRESTLength = "length"
storageRESTCount = "count"
storageRESTBitrotAlgo = "bitrot-algo"
storageRESTBitrotHash = "bitrot-hash"
storageRESTDiskID = "disk-id"
storageRESTForceDelete = "force-delete"
storageRESTBitrotAlgo = "balg"
storageRESTBitrotHash = "bhash"
storageRESTDiskID = "did"
storageRESTForceDelete = "fdel"
storageRESTGlob = "glob"
storageRESTMetrics = "metrics"
storageRESTDriveQuorum = "drive-quorum"
storageRESTOrigVolume = "orig-volume"
storageRESTInclFreeVersions = "incl-free-versions"
storageRESTDriveQuorum = "dquorum"
storageRESTOrigVolume = "ovol"
storageRESTInclFreeVersions = "incl-fv"
storageRESTRange = "rng"
)
type nsScannerOptions struct {