Commit dc2fde96 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 0e9a86f0
...@@ -25,6 +25,8 @@ import ( ...@@ -25,6 +25,8 @@ import (
"sort" "sort"
) )
const debugRangeSet = true
// Range represents [lo,hi) Key range. // Range represents [lo,hi) Key range.
type Range struct { type Range struct {
lo Key lo Key
...@@ -55,6 +57,13 @@ func (S *RangeSet) Del(k Key) { ...@@ -55,6 +57,13 @@ func (S *RangeSet) Del(k Key) {
// AddRange adds Range r to the set. // AddRange adds Range r to the set.
func (S *RangeSet) AddRange(r Range) { func (S *RangeSet) AddRange(r Range) {
if debugRangeSet {
fmt.Printf("\n\nAddRange:\n")
fmt.Printf(" S: %s\n", S)
fmt.Printf(" r: %s\n", r)
defer fmt.Printf("->S: %s\n", S)
}
S.verify() S.verify()
defer S.verify() defer S.verify()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment