diff --git a/catalog/mvcc/cataloger_list_entries.go b/catalog/mvcc/cataloger_list_entries.go index ba49e4924f1..e51b7772d9e 100644 --- a/catalog/mvcc/cataloger_list_entries.go +++ b/catalog/mvcc/cataloger_list_entries.go @@ -102,7 +102,7 @@ func (c *cataloger) listEntriesByLevel(ctx context.Context, repository string, r } // readParamsType is a struct holding the parameters needed to perform SQL read queries. -// reading is mainly done in the main loop at "loopByLevel". It may happen (hopefully rarely) in getMoreRows. +// reading is mainly done in the main loop at "loopByLevel". It may happen (hopefully rarely) in getMoreRows. // variables needed for accessing the database are packed and passed down to getMoreRows type readParamsType struct { tx db.Tx @@ -113,7 +113,7 @@ type readParamsType struct { branchQueryMap map[int64]sq.SelectBuilder } -// LoopByLevel Extracts the prefixes(directories) that exist under a certain prefix. (drill down in the object store "directory tree" +// loopByLevel extracts the prefixes(directories) that exist under a certain prefix. (drill down in the object store "directory tree" // on each iteration, the function does the SQL retrieval from all lineage branches, and the calls "processSinglePrefix" to decide // which prefix to return from all lineage branches. // paths are parsed by the delimiter (usually '/') @@ -201,7 +201,7 @@ func loopByLevel(tx db.Tx, prefix, after, delimiter string, limit, branchBatchSi } } -// "processSinglePrefix" extracts either a single prefix, or a list of leaf entries from results of union-reading from lineage branches +// processSinglePrefix extracts either a single prefix, or a list of leaf entries from results of union-reading from lineage branches // branch priority map reflect the lineage order, with lower numbers indicating higher priority. it is used to decide which // branch returned the prefix when the same path was returned by more than one branch. func processSinglePrefix(unionReadResults []entryPathPrefixInfo, delimiter string, branchPriorityMap map[int64]int, @@ -251,7 +251,7 @@ func processSinglePrefix(unionReadResults []entryPathPrefixInfo, delimiter strin } } -// getMoreRows reads entries from a single branch after "processSinglePrefix" exhausts a branch before finding the next path. +// getMoreRows reads entries from a single branch after "processSinglePrefix" exhausts a branch before finding the next path. // "processSinglePrefix" reads more rows for that branch and stores the results directly into branchRanges. func getMoreRows(path string, branch int64, branchRanges map[int64][]entryPathPrefixInfo, readParams readParamsType) error { readBuf := make([]entryPathPrefixInfo, 0, readParams.branchBatchSize) @@ -300,7 +300,7 @@ func findLowestResultInBranches(branchRanges map[int64][]entryPathPrefixInfo, br } // buildBaseLevelQuery builds a map of select queries for each of the branches in the requested branch lineage -// number of entries that will be retrieved for each branch is limitted to branchBatchSize (The reason it is not enough +// number of entries that will be retrieved for each branch is limited to branchBatchSize (The reason it is not enough // to read a single row is that we may retrieve deleted entries or tombstones, that should be skipped. // the requested commitID is passed to the base branch as is. each of the lineage branches gets the commit id from its lineage. func buildBaseLevelQuery(baseBranchID int64, lineage []lineageCommit, branchBatchSize int, @@ -313,7 +313,6 @@ func buildBaseLevelQuery(baseBranchID int64, lineage []lineageCommit, branchBatc return unionMap } -// // buildSingleBranchQuery builds a query on a single branch of the lineage returning entries as they were at topCommitID. // called mainly from "buildBaseLevelQuery" above. // the other function that calls it is "getMoreRows" that needs entries for a single branch.