diff options
| author | chrislu <chris.lu@gmail.com> | 2022-08-15 01:05:35 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2022-08-15 01:05:35 -0700 |
| commit | cb476a53ffe8861565f4b8e40e985ce7bac81fe9 (patch) | |
| tree | faca2805f2dcf8bc9b6172c1a2b5a60957f8d7ab | |
| parent | 7c029b21832682e27bbac5a310323a7aeed6afe9 (diff) | |
| download | seaweedfs-cb476a53ffe8861565f4b8e40e985ce7bac81fe9.tar.xz seaweedfs-cb476a53ffe8861565f4b8e40e985ce7bac81fe9.zip | |
remove logs
| -rw-r--r-- | weed/util/mem/slot_pool.go | 9 | ||||
| -rw-r--r-- | weed/wdclient/vid_map.go | 2 |
2 files changed, 1 insertions, 10 deletions
diff --git a/weed/util/mem/slot_pool.go b/weed/util/mem/slot_pool.go index 16b497af5..70f2525b3 100644 --- a/weed/util/mem/slot_pool.go +++ b/weed/util/mem/slot_pool.go @@ -1,9 +1,7 @@ package mem import ( - "github.com/seaweedfs/seaweedfs/weed/glog" "sync" - "sync/atomic" ) var pools []*sync.Pool @@ -41,13 +39,8 @@ func getSlotPool(size int) (*sync.Pool, bool) { return pools[index], true } -var total int64 - func Allocate(size int) []byte { if pool, found := getSlotPool(size); found { - newVal := atomic.AddInt64(&total, 1) - glog.V(4).Infof("++> %d", newVal) - slab := *pool.Get().(*[]byte) return slab[:size] } @@ -56,8 +49,6 @@ func Allocate(size int) []byte { func Free(buf []byte) { if pool, found := getSlotPool(cap(buf)); found { - newVal := atomic.AddInt64(&total, -1) - glog.V(4).Infof("--> %d", newVal) pool.Put(&buf) } } diff --git a/weed/wdclient/vid_map.go b/weed/wdclient/vid_map.go index 255bac279..89542b25b 100644 --- a/weed/wdclient/vid_map.go +++ b/weed/wdclient/vid_map.go @@ -128,7 +128,7 @@ func (vc *vidMap) GetVidLocations(vid string) (locations []Location, err error) } func (vc *vidMap) GetLocations(vid uint32) (locations []Location, found bool) { - glog.V(4).Infof("~ lookup volume id %d: %+v ec:%+v", vid, vc.vid2Locations, vc.ecVid2Locations) + // glog.V(4).Infof("~ lookup volume id %d: %+v ec:%+v", vid, vc.vid2Locations, vc.ecVid2Locations) locations, found = vc.getLocations(vid) if found && len(locations) > 0 { return locations, found |
