mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-05 18:47:20 +01:00
test: detect the chunk merge in the merge-read FUSE test without a zero stamp (#12975)
The test took a single chunk stamped 0 as the sign that a flush merged the file. Merged chunks now carry the stamp of the oldest data they hold, so the loop never saw the merge and the test failed before reading. Take a flush that leaves one chunk where several were stored as the merge. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1ddc01d93f
commit
4c49dea692
1 file changed
+3
-4
@@ -83,7 +83,7 @@ func testReadOpenHandleAfterChunkMerge(t *testing.T, framework *FuseTestFramewor
|
||||
_, err = held.WriteAt(window, int64(start*mergePageSize))
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, held.Sync())
|
||||
if after := mergeEntryChunks(t, framework, name); len(after) == 1 && after[0].ModifiedTsNs == 0 {
|
||||
if after := mergeEntryChunks(t, framework, name); len(before) > 1 && len(after) == 1 {
|
||||
replaced = before
|
||||
break
|
||||
}
|
||||
@@ -151,9 +151,8 @@ func mergePagePattern(page, version int) []byte {
|
||||
}
|
||||
|
||||
type mergeChunk struct {
|
||||
FileId string `json:"file_id"`
|
||||
ModifiedTsNs int64 `json:"modified_ts_ns"`
|
||||
Fid *struct {
|
||||
FileId string `json:"file_id"`
|
||||
Fid *struct {
|
||||
VolumeId uint32 `json:"volume_id"`
|
||||
FileKey uint64 `json:"file_key"`
|
||||
Cookie uint32 `json:"cookie"`
|
||||
|
||||
Reference in new issue
Block a user