This commit is contained in:
Harshil Goel
2025-02-03 13:55:24 +05:30
parent 907a80bebd
commit 9edf258440
+4 -1
View File
@@ -571,7 +571,7 @@ func TestIngest(t *testing.T) {
ts := uint64(0)
for totalBytes < totalDataSize {
fmt.Println(ts, totalBytes)
fmt.Println(ts, totalBytes, float64(totalBytes)/float64(totalDataSize), time.Since(startTime))
ts += 1
var wg sync.WaitGroup
txn := db.NewTransactionAt(math.MaxUint64, true)
@@ -583,6 +583,9 @@ func TestIngest(t *testing.T) {
if err := txn.Set([]byte(key), value); err != nil {
log.Fatalf("Failed to write to Badger: %v", err)
}
if txn.skiplist.MemSize() >= opt.MemTableSize {
break
}
}
wg.Add(1)
if err := txn.CommitAt(ts, func(err error) {