未验证 提交 3667bb09 编写于 作者: X Xiaofan 提交者: GitHub

Avoid Sync when the segment open (#21397)

Signed-off-by: Nxiaofan-luan <xiaofan.luan@zilliz.com>
上级 0bcedbd2
......@@ -30,6 +30,7 @@ import (
"github.com/milvus-io/milvus/internal/proto/internalpb"
"github.com/milvus-io/milvus/internal/storage"
"github.com/milvus-io/milvus/internal/types"
"github.com/milvus-io/milvus/internal/util/tsoutil"
"github.com/milvus-io/milvus/internal/util/typeutil"
"github.com/samber/lo"
"go.uber.org/zap"
......@@ -214,7 +215,7 @@ func (c *ChannelMeta) addSegment(req addSegmentReq) error {
historyInsertBuf: make([]*BufferData, 0),
historyDeleteBuf: make([]*DelDataBuf, 0),
startPos: req.startPos,
lastSyncTs: req.recoverTs,
lastSyncTs: tsoutil.GetCurrentTime(),
}
seg.setType(req.segType)
// Set up pk stats
......
......@@ -84,7 +84,7 @@ func (p *proxyManager) WatchProxy() error {
if err != nil {
return err
}
log.Debug("succeed to init sessions on etcd", zap.Any("sessions", sessions), zap.Int64("revision", rev))
log.Info("succeed to init sessions on etcd", zap.Any("sessions", sessions), zap.Int64("revision", rev))
// all init function should be clear meta firstly.
for _, f := range p.initSessionsFunc {
f(sessions)
......@@ -103,7 +103,7 @@ func (p *proxyManager) WatchProxy() error {
}
func (p *proxyManager) startWatchEtcd(ctx context.Context, eventCh clientv3.WatchChan) {
log.Debug("start to watch etcd")
log.Info("start to watch etcd")
for {
select {
case <-ctx.Done():
......@@ -194,7 +194,7 @@ func (p *proxyManager) getSessionsOnEtcd(ctx context.Context) ([]*sessionutil.Se
for _, v := range resp.Kvs {
session, err := p.parseSession(v.Value)
if err != nil {
log.Debug("failed to unmarshal session", zap.Error(err))
log.Warn("failed to unmarshal session", zap.Error(err))
return nil, 0, err
}
sessions = append(sessions, session)
......
......@@ -120,7 +120,7 @@ func TestProxyManager_ErrCompacted(t *testing.T) {
Params.EtcdCfg.EtcdTLSMinVersion.GetValue())
assert.Nil(t, err)
defer etcdCli.Close()
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
sessKey := path.Join(Params.EtcdCfg.MetaRootPath.GetValue(), sessionutil.DefaultServiceRoot)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册