From edc0ba779be6441aadc3547c2c3b5a1d3144d117 Mon Sep 17 00:00:00 2001 From: Cai Zhang Date: Thu, 31 Oct 2024 11:18:00 +0800 Subject: [PATCH] Use ts as msgID for request Signed-off-by: Cai Zhang --- internal/proxy/task_scheduler.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/internal/proxy/task_scheduler.go b/internal/proxy/task_scheduler.go index 05a8199844f94..d36b9980533e9 100644 --- a/internal/proxy/task_scheduler.go +++ b/internal/proxy/task_scheduler.go @@ -177,18 +177,14 @@ func (queue *baseTaskQueue) Enqueue(t task) error { var id UniqueID if t.CanSkipAllocTimestamp() { ts = tsoutil.ComposeTS(time.Now().UnixMilli(), 0) - id, err = globalMetaCache.AllocID(t.TraceCtx()) - if err != nil { - return err - } } else { ts, err = queue.tsoAllocatorIns.AllocOne(t.TraceCtx()) if err != nil { return err } - // we always use same msg id and ts for now. - id = UniqueID(ts) } + // we always use same msg id and ts for now. + id = UniqueID(ts) t.SetTs(ts) t.SetID(id)