提交 18cf816e 编写于 作者: B become-nice 提交者: yefu.chen

Update the organization form of the stored prefix key

Signed-off-by: Nbecome-nice <995581097@qq.com>
上级 18a56c9b
......@@ -617,4 +617,4 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
\ No newline at end of file
......@@ -28,4 +28,4 @@ func NewStore(ctx context.Context, driver types.DriverType) (types.Store, error)
return store, nil
}
return nil, errors.New("unsupported driver")
}
}
\ No newline at end of file
......@@ -44,8 +44,8 @@ func (wn *WriteNode) InsertBatchData(ctx context.Context, data []*schema.InsertM
var timeStamp []uint64
for i := 0; i < len(data); i++ {
prefixKey = data[i].CollectionName + "_" + strconv.FormatInt(data[i].EntityId, 10)
suffixKey = data[i].PartitionTag + "_" + strconv.FormatUint(data[i].SegmentId, 10)
prefixKey = data[i].CollectionName + "-" + strconv.FormatUint(data[i].EntityId, 10)
suffixKey = strconv.FormatUint(data[i].SegmentId, 10)
prefixKeys = append(prefixKeys, []byte(prefixKey))
suffixKeys = append(suffixKeys, []byte(suffixKey))
binaryData = append(binaryData, data[i].Serialization())
......@@ -68,7 +68,7 @@ func (wn *WriteNode) DeleteBatchData(ctx context.Context, data []*schema.DeleteM
var timeStamps []uint64
for i := 0; i < len(data); i++ {
prefixKey = data[i].CollectionName + "_" + strconv.FormatInt(data[i].EntityId, 10) + "_"
prefixKey = data[i].CollectionName + "-" + strconv.FormatUint(data[i].EntityId, 10)
prefixKeys = append(prefixKeys, []byte(prefixKey))
timeStamps = append(timeStamps, data[i].Timestamp)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册