Skip to content

Commit

Permalink
Fixed lint
Browse files Browse the repository at this point in the history
  • Loading branch information
merlimat committed Sep 21, 2024
1 parent b6ea79e commit a914802
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/wal/wal_ro_segment.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func (r *readOnlySegmentsGroup) PollHighestSegment() (common.RefCount[ReadOnlySe
defer r.Unlock()

if r.allSegments.Empty() {
return nil, nil // nolint: nilnil
return nil, nil //nolint: nilnil

Check failure on line 296 in server/wal/wal_ro_segment.go

View workflow job for this annotation

GitHub Actions / Build & Test

comment-spacings: no space between comment delimiter and comment text (revive)
}

offset, _ := r.allSegments.Max()
Expand Down
6 changes: 3 additions & 3 deletions server/wal/wal_rw_segment.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ func newReadWriteSegment(basePath string, baseOffset int64, segmentSize uint32)
segmentSize: segmentSize,
}

if pooledBuffer, ok := bufferPool.Get().([]byte); ok {
ms.writingIdx = pooledBuffer[:0]
if pooledBuffer, ok := bufferPool.Get().(*[]byte); ok {
ms.writingIdx = (*pooledBuffer)[:0]
} else {
// Start with empty slice, though with some initial capacity
ms.writingIdx = make([]byte, 0, initialIndexBufferCapacity)
Expand Down Expand Up @@ -196,7 +196,7 @@ func (ms *readWriteSegment) Close() error {
ms.writeIndex(),
)

bufferPool.Put(ms.writingIdx)
bufferPool.Put(&ms.writingIdx)
return err
}

Expand Down

0 comments on commit a914802

Please sign in to comment.