(bucketID core.BucketId, key, value []byte, flag uint16, status uint16, ttl uint32, ts uint64, txID uint64, ds core.DataStructure)
| 462 | func (r *recordingHintWriter) Close() error { return nil } |
| 463 | |
| 464 | func createTestEntry(bucketID core.BucketId, key, value []byte, flag uint16, status uint16, ttl uint32, ts uint64, txID uint64, ds core.DataStructure) *core.Entry { |
| 465 | meta := core.NewMetaData(). |
| 466 | WithBucketId(uint64(bucketID)). |
| 467 | WithKeySize(uint32(len(key))). |
| 468 | WithValueSize(uint32(len(value))). |
| 469 | WithFlag(flag). |
| 470 | WithStatus(status). |
| 471 | WithTTL(ttl). |
| 472 | WithTimeStamp(ts). |
| 473 | WithTxID(txID). |
| 474 | WithDs(uint16(ds)) |
| 475 | |
| 476 | entry := &core.Entry{ |
| 477 | Key: append([]byte(nil), key...), |
| 478 | Value: append([]byte(nil), value...), |
| 479 | Meta: meta, |
| 480 | } |
| 481 | |
| 482 | // Encode once to populate CRC and ensure the entry is well-formed. |
| 483 | entry.Encode() |
| 484 | return entry |
| 485 | } |
| 486 | |
| 487 | func TestMergeV2PrepareWhileAlreadyMerging(t *testing.T) { |
| 488 | dir := t.TempDir() |
no test coverage detected