mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
fix: [2.3] the delete msg disorder issue (#29917)
/kind improvement pr: #29915 Signed-off-by: SimFG <bang.fu@zilliz.com>
This commit is contained in:
parent
e1446da83c
commit
d573f0ec1a
@ -162,6 +162,9 @@ func (t *compactionTask) mergeDeltalogs(dBlobs map[UniqueID][]*Blob) (map[interf
|
||||
for i := int64(0); i < dData.RowCount; i++ {
|
||||
pk := dData.Pks[i]
|
||||
ts := dData.Tss[i]
|
||||
if lastTS, ok := pk2ts[pk.GetValue()]; ok && lastTS > ts {
|
||||
ts = lastTS
|
||||
}
|
||||
|
||||
pk2ts[pk.GetValue()] = ts
|
||||
}
|
||||
|
||||
@ -197,6 +197,7 @@ func TestCompactionTaskInnerMethods(t *testing.T) {
|
||||
4,
|
||||
5,
|
||||
1,
|
||||
2,
|
||||
},
|
||||
[]Timestamp{
|
||||
20000,
|
||||
@ -205,6 +206,7 @@ func TestCompactionTaskInnerMethods(t *testing.T) {
|
||||
30000,
|
||||
50000,
|
||||
50000,
|
||||
10000,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -232,6 +234,7 @@ func TestCompactionTaskInnerMethods(t *testing.T) {
|
||||
if test.isvalid {
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, 5, len(pk2ts))
|
||||
assert.EqualValues(t, 20001, pk2ts[UniqueID(2)])
|
||||
} else {
|
||||
assert.Error(t, err)
|
||||
assert.Nil(t, pk2ts)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user