MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / getHintPath

Function getHintPath

hintfile.go:45–51  ·  view source on GitHub ↗

getHintPath returns the hint file path for the given file ID and directory

(fid int64, dir string)

Source from the content-addressed store, hash-verified

43
44// getHintPath returns the hint file path for the given file ID and directory
45func getHintPath(fid int64, dir string) string {
46 if IsMergeFile(fid) {
47 seq := GetMergeSeq(fid)
48 return filepath.Join(dir, fmt.Sprintf("merge_%d%s", seq, HintSuffix))
49 }
50 return filepath.Join(dir, strconv2.Int64ToStr(fid)+HintSuffix)
51}
52
53// HintEntry represents an entry in the hint file
54type HintEntry struct {

Callers 15

purgeMergeFilesFunction · 0.85
commitMethod · 0.85
recoverMergeManifestMethod · 0.85
mergeLegacyMethod · 0.85
loadHintFileMethod · 0.85
TestDB_HintFileDisabledFunction · 0.85
TestGetHintPathFunction · 0.85
TestDB_MergeWithHintFileFunction · 0.85

Calls 2

IsMergeFileFunction · 0.85
GetMergeSeqFunction · 0.85