diff --git a/banyand/measure/merger.go b/banyand/measure/merger.go index a46cbf036..9d14f1c94 100644 --- a/banyand/measure/merger.go +++ b/banyand/measure/merger.go @@ -53,6 +53,7 @@ func (tst *tsTable) mergeLoop(merges chan *mergerIntroduction, flusherNotifier w return false } defer curSnapshot.decRef() + tst.l.Logger.Warn().Msgf("mergeLoop: cur %d merge %d", curSnapshot.epoch, epoch) if curSnapshot.epoch != epoch { tst.incTotalMergeLoopStarted(1) defer tst.incTotalMergeLoopFinished(1) diff --git a/banyand/measure/tstable_test.go b/banyand/measure/tstable_test.go index 2f24d5a6c..bc8cdf006 100644 --- a/banyand/measure/tstable_test.go +++ b/banyand/measure/tstable_test.go @@ -342,8 +342,8 @@ func Test_tstIter(t *testing.T) { snp.decRef() break OUTER } - t.Logf("waiting for snapshot %d to be flushed or merged: current creator:%d, parts: %+v", - i, snp.creator, snp.parts) + t.Logf("waiting for snapshot %d(%d) to be flushed or merged: current creator:%d, parts: %+v", + i, snp.creator, snp.epoch, snp.parts) snp.decRef() time.Sleep(100 * time.Millisecond) } @@ -367,7 +367,7 @@ func Test_tstIter(t *testing.T) { snp.decRef() break OUTER1 } - t.Logf("waiting for snapshot to be merged: current creator:%d, parts: %+v", snp.creator, snp.parts) + t.Logf("waiting for snapshot to be merged: current creator:%d(%d), parts: %+v", snp.creator, snp.epoch, snp.parts) snp.decRef() time.Sleep(100 * time.Millisecond) } diff --git a/banyand/stream/merger.go b/banyand/stream/merger.go index 59cde2cd0..f8946c3a3 100644 --- a/banyand/stream/merger.go +++ b/banyand/stream/merger.go @@ -53,6 +53,7 @@ func (tst *tsTable) mergeLoop(merges chan *mergerIntroduction, flusherNotifier w return false } defer curSnapshot.decRef() + tst.l.Logger.Warn().Msgf("mergeLoop: cur %d merge %d", curSnapshot.epoch, epoch) if curSnapshot.epoch != epoch { tst.incTotalMergeLoopStarted(1) defer tst.incTotalMergeLoopFinished(1) diff --git a/banyand/stream/tstable_test.go b/banyand/stream/tstable_test.go index 9224e5523..163af8cc7 100644 --- a/banyand/stream/tstable_test.go +++ b/banyand/stream/tstable_test.go @@ -328,8 +328,8 @@ func Test_tstIter(t *testing.T) { snp.decRef() break OUTER } - t.Logf("waiting for snapshot %d to be flushed or merged: current creator:%d, parts: %+v", - i, snp.creator, snp.parts) + t.Logf("waiting for snapshot %d(%d) to be flushed or merged: current creator:%d, parts: %+v", + i, snp.creator, snp.epoch, snp.parts) snp.decRef() time.Sleep(100 * time.Millisecond) } @@ -353,7 +353,7 @@ func Test_tstIter(t *testing.T) { snp.decRef() break OUTER1 } - t.Logf("waiting for snapshot to be merged: current creator:%d, parts: %+v", snp.creator, snp.parts) + t.Logf("waiting for snapshot to be merged: current creator:%d(%d), parts: %+v", snp.creator, snp.epoch, snp.parts) snp.decRef() time.Sleep(100 * time.Millisecond) }