From ec5a305624325b0417c261d7d0fbbd33b3701b7c Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 9 Dec 2018 00:12:37 -0800 Subject: [PATCH] refactor --- weed/storage/needle/compact_map.go | 4 ++++ weed/storage/needle/needle_value.go | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/weed/storage/needle/compact_map.go b/weed/storage/needle/compact_map.go index 63781f6a2..39f80e4d1 100644 --- a/weed/storage/needle/compact_map.go +++ b/weed/storage/needle/compact_map.go @@ -5,6 +5,10 @@ import ( "sync" ) +const ( + batch = 100000 +) + type CompactSection struct { sync.RWMutex values []NeedleValue diff --git a/weed/storage/needle/needle_value.go b/weed/storage/needle/needle_value.go index b15d25245..96ee83009 100644 --- a/weed/storage/needle/needle_value.go +++ b/weed/storage/needle/needle_value.go @@ -5,10 +5,6 @@ import ( "github.com/google/btree" ) -const ( - batch = 100000 -) - type NeedleValue struct { Key NeedleId Offset Offset `comment:"Volume offset"` //since aligned to 8 bytes, range is 4G*8=32G