From 7ef1f17d93282bb1e1c0ae8879dfdcd268d2a07d Mon Sep 17 00:00:00 2001 From: Aiee <18348405+Aiee@users.noreply.github.com> Date: Wed, 7 Aug 2024 12:42:45 +0800 Subject: [PATCH] Fix session create time --- src/meta/processors/session/SessionManagerProcessor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/meta/processors/session/SessionManagerProcessor.cpp b/src/meta/processors/session/SessionManagerProcessor.cpp index 9ea499a6ae8..6c02fbc5aa7 100644 --- a/src/meta/processors/session/SessionManagerProcessor.cpp +++ b/src/meta/processors/session/SessionManagerProcessor.cpp @@ -14,8 +14,8 @@ void CreateSessionProcessor::process(const cpp2::CreateSessionReq &req) { auto user = req.get_user(); cpp2::Session session; // The sessionId is generated by microsecond timestamp - session.session_id_ref() = folly::Random::rand64(); - session.create_time_ref() = session.get_session_id(); + session.session_id_ref() = static_cast(folly::Random::rand64()); + session.create_time_ref() = time::WallClock::fastNowInMicroSec(); session.update_time_ref() = session.get_create_time(); session.user_name_ref() = user; session.graph_addr_ref() = req.get_graph_addr();