diff options
Diffstat (limited to 'weed/util')
| -rw-r--r-- | weed/util/chunk_cache/chunk_cache.go | 2 | ||||
| -rw-r--r-- | weed/util/chunk_cache/chunk_cache_on_disk_test.go | 8 | ||||
| -rw-r--r-- | weed/util/log_buffer/log_buffer.go | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/weed/util/chunk_cache/chunk_cache.go b/weed/util/chunk_cache/chunk_cache.go index 9f2a0518f..7c4a77304 100644 --- a/weed/util/chunk_cache/chunk_cache.go +++ b/weed/util/chunk_cache/chunk_cache.go @@ -131,4 +131,4 @@ func (c *ChunkCache) Shutdown() { for _, diskCache := range c.diskCaches { diskCache.Shutdown() } -}
\ No newline at end of file +} diff --git a/weed/util/chunk_cache/chunk_cache_on_disk_test.go b/weed/util/chunk_cache/chunk_cache_on_disk_test.go index 256b10139..f93daf5a7 100644 --- a/weed/util/chunk_cache/chunk_cache_on_disk_test.go +++ b/weed/util/chunk_cache/chunk_cache_on_disk_test.go @@ -21,11 +21,11 @@ func TestOnDisk(t *testing.T) { writeCount := 5 type test_data struct { - data []byte + data []byte fileId string } testData := make([]*test_data, writeCount) - for i:=0;i<writeCount;i++{ + for i := 0; i < writeCount; i++ { buff := make([]byte, 1024*1024) rand.Read(buff) testData[i] = &test_data{ @@ -35,7 +35,7 @@ func TestOnDisk(t *testing.T) { cache.SetChunk(testData[i].fileId, testData[i].data) } - for i:=0;i<writeCount;i++{ + for i := 0; i < writeCount; i++ { data := cache.GetChunk(testData[i].fileId) if bytes.Compare(data, testData[i].data) != 0 { t.Errorf("failed to write to and read from cache: %d", i) @@ -46,7 +46,7 @@ func TestOnDisk(t *testing.T) { cache = NewChunkCache(0, tmpDir, totalDiskSizeMb, segmentCount) - for i:=0;i<writeCount;i++{ + for i := 0; i < writeCount; i++ { data := cache.GetChunk(testData[i].fileId) if bytes.Compare(data, testData[i].data) != 0 { t.Errorf("failed to write to and read from cache: %d", i) diff --git a/weed/util/log_buffer/log_buffer.go b/weed/util/log_buffer/log_buffer.go index 3b3396128..04fabdf8c 100644 --- a/weed/util/log_buffer/log_buffer.go +++ b/weed/util/log_buffer/log_buffer.go @@ -163,7 +163,7 @@ func (m *LogBuffer) ReadFromBuffer(lastReadTime time.Time) (ts time.Time, buffer /* for i, pos := range m.idx { logEntry, ts := readTs(m.buf, pos) - event := &filer_pb.FullEventNotification{} + event := &filer_pb.SubscribeMetadataResponse{} proto.Unmarshal(logEntry.Data, event) entry := event.EventNotification.OldEntry if entry == nil { |
