diff --git a/cmd/mtredisalize/changetracker.go b/cmd/mtredisalize/changetracker.go index 6024e97..92bca33 100644 --- a/cmd/mtredisalize/changetracker.go +++ b/cmd/mtredisalize/changetracker.go @@ -11,6 +11,9 @@ import ( "bitbucket.org/s_l_teichmann/mtredisalize/common" ) +// Pull up if it _really_ produces too much data. +const quantizationFactor = 1 + type quantizedXZ struct { X, Z int16 } @@ -32,12 +35,13 @@ func (ct *ChangeTracker) BlockChanged(key []byte) { return } ct.mutex.Lock() - ct.changes[quantizedXZ{X: coord.X / 16, Z: coord.Z / 16}] = true + ct.changes[quantizedXZ{ + X: coord.X / quantizationFactor, + Z: coord.Z / quantizationFactor}] = true ct.mutex.Unlock() } func (ct *ChangeTracker) FlushChanges(url string) (err error) { - log.Println("change flush triggered") var oldChanges map[quantizedXZ]bool ct.mutex.Lock() if len(ct.changes) > 0 {