We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example code:
func TestSegmentAppendPanic(t *testing.T) { basePath := t.TempDir() rw, err := newReadWriteSegment(basePath, 0, 1024, 0, nil) assert.NoError(t, err) for i := int64(0); i < 100; i++ { err := rw.Append(i, fmt.Appendf(nil, "entry-%d", i)) assert.NoError(t, err) } }
will panic with:
panic: runtime error: slice bounds out of range [1030:1024] [recovered] panic: runtime error: slice bounds out of range [1030:1024] goroutine 8 [running]: testing.tRunner.func1.2({0x105424720, 0x14000034930}) /Users/bytedance/.gvm/gos/go1.23.5/src/testing/testing.go:1632 +0x3c8 testing.tRunner.func1() /Users/bytedance/.gvm/gos/go1.23.5/src/testing/testing.go:1635 +0x6f8 panic({0x105424720?, 0x14000034930?}) /Users/bytedance/.gvm/gos/go1.23.5/src/runtime/panic.go:785 +0x124 github.com/streamnative/oxia/server/wal/codec.(*V2).WriteRecord(0x1059de920, {0x105dfc000, 0x400, 0x400}, 0x406, 0x4c6ae8db, {0x14000292560, 0x8, 0x8}) /Users/bytedance/workspace/github.com/streamnative/oxia/server/wal/codec/v2.go:145 +0x548 github.com/streamnative/oxia/server/wal.(*readWriteSegment).Append(0x140001ec160, 0x34, {0x14000292560, 0x8, 0x8}) /Users/bytedance/workspace/github.com/streamnative/oxia/server/wal/wal_rw_segment.go:163 +0x1c8
We should not panic even if the segment cann't accept entry exceeded it's size.
The text was updated successfully, but these errors were encountered:
fix(619): append into ReadWriteSegment when it exceeded size should n…
8c1d357
…ot panic (#627) Fix: #619 --------- Co-authored-by: Matteo Merli <mmerli@apache.org>
Successfully merging a pull request may close this issue.
Example code:
will panic with:
We should not panic even if the segment cann't accept entry exceeded it's size.
The text was updated successfully, but these errors were encountered: