Skip to content

Commit

Permalink
Implement gap tracking in the segment set.
Browse files Browse the repository at this point in the history
This change was derived from a change by:
  Reapor-Yurnero <reapor.yurnero@gmail.com>

And has been modified by:
  Adin Scannell <ascannell@google.com>

(The original change author is preserved for the commit.)

This change implements gap tracking in the segment set by adding additional
information in each node, and using that information to speed up gap finding
from a linear scan to a O(log(n)) walk of the tree.

This gap tracking is optional, and will default to off except for segment
instances that set gapTracking equal to 1 in their const lists.

PiperOrigin-RevId: 312621607
  • Loading branch information
Reapor-Yurnero authored and gvisor-bot committed May 21, 2020
1 parent 8298c5b commit 059879e
Show file tree
Hide file tree
Showing 8 changed files with 792 additions and 66 deletions.
2 changes: 2 additions & 0 deletions pkg/segment/BUILD
Expand Up @@ -21,6 +21,8 @@ go_template(
],
opt_consts = [
"minDegree",
# trackGaps must either be 0 or 1.
"trackGaps",
],
types = [
"Key",
Expand Down

0 comments on commit 059879e

Please sign in to comment.