reduce one redis lookup on hot path

This commit is contained in:
Chris Lu committed 2021-10-06 22:01:19 -07:00
1 parent 03bb82043c
commit f3d8232e14
2 files changed
+16 -18

No files matched your search

+3
View File
@@ -467,6 +467,9 @@ func (t *SkipList) GetSmallestNode() (*SkipListElement, error) {
func (t *SkipList) GetLargestNode() (*SkipListElement, error) {
return t.LoadElement(t.EndLevels[0])
}
func (t *SkipList) GetLargestNodeReference() (*SkipListElementReference) {
return t.EndLevels[0]
}
// Next returns the next element based on the given node.
// Next will loop around to the first node, if you call it on the last!