@@ -405,7 +405,7 @@ static int64_t resolve_version_at_time(Transaction* txn, const std::string& inst
405405 FullRangeGetOptions options;
406406 options.reverse = true ;
407407 options.begin_key_selector = RangeKeySelector::FIRST_GREATER_OR_EQUAL ;
408- options.end_key_selector = RangeKeySelector::FIRST_GREATER_THAN ;
408+ options.end_key_selector = RangeKeySelector::FIRST_GREATER_THAN ;
409409
410410 std::unique_ptr<FullRangeGetIterator> iter =
411411 txn->full_range_get (begin_key, end_key, std::move (options));
@@ -414,7 +414,7 @@ static int64_t resolve_version_at_time(Transaction* txn, const std::string& inst
414414 auto item = iter->next ();
415415 if (!item.has_value ()) break ;
416416
417- std::string_view raw_key = item->first ;
417+ std::string_view raw_key = item->first ;
418418 std::string_view raw_value = item->second ;
419419
420420 // Strip the trailing versionstamp suffix before deserialising the value.
@@ -464,7 +464,7 @@ void MetaServiceImpl::get_version_at_time(::google::protobuf::RpcController* con
464464 return ;
465465 }
466466
467- int64_t timestamp_ms = request->timestamp_ms ();
467+ int64_t timestamp_ms = request->timestamp_ms ();
468468 int32_t retention_days = request->has_retention_days () ? request->retention_days () : 90 ;
469469
470470 // Validate timestamp window — same logic for both single and batch.
@@ -482,8 +482,8 @@ void MetaServiceImpl::get_version_at_time(::google::protobuf::RpcController* con
482482 // Allow configurable clock skew to prevent spurious future-timestamp rejections.
483483 if (timestamp_ms > now_ms + config::time_travel_clock_skew_tolerance_ms) {
484484 code = MetaServiceCode::INVALID_ARGUMENT ;
485- msg = fmt::format (" Requested timestamp {} ms is in the future (now={} ms)." ,
486- timestamp_ms, now_ms);
485+ msg = fmt::format (" Requested timestamp {} ms is in the future (now={} ms)." , timestamp_ms,
486+ now_ms);
487487 return ;
488488 }
489489
@@ -510,9 +510,9 @@ void MetaServiceImpl::get_version_at_time(::google::protobuf::RpcController* con
510510 std::vector<int64_t > resolved_times (n);
511511 for (int i = 0 ; i < n; ++i) {
512512 int64_t update_time_ms = -1 ;
513- int64_t version = resolve_version_at_time (txn. get (), instance_id,
514- request->partition_ids (i),
515- timestamp_ms, &update_time_ms);
513+ int64_t version =
514+ resolve_version_at_time (txn. get (), instance_id, request->partition_ids (i),
515+ timestamp_ms, &update_time_ms);
516516 if (version == -2 ) {
517517 code = MetaServiceCode::KV_TXN_GET_ERR ;
518518 msg = fmt::format (" FDB scan error during time travel for partition {}" ,
@@ -543,30 +543,29 @@ void MetaServiceImpl::get_version_at_time(::google::protobuf::RpcController* con
543543 // Each encoded int64 in the key is 9 bytes (1 tag + 8 data).
544544 std::string ck_begin, ck_end;
545545 tt_compaction_key ({instance_id, tablet_id, 0 , 0 }, &ck_begin);
546- tt_compaction_key ({instance_id, tablet_id,
547- std::numeric_limits<int64_t >::max (),
548- std::numeric_limits< int64_t >:: max ()}, &ck_end);
546+ tt_compaction_key ({instance_id, tablet_id, std::numeric_limits< int64_t >:: max (),
547+ std::numeric_limits<int64_t >::max ()} ,
548+ &ck_end);
549549 ck_end.push_back (' \xff ' );
550550
551551 std::unique_ptr<RangeGetIterator> ck_iter;
552552 bool found_checkpoint = false ;
553- if (txn->get (ck_begin, ck_end, &ck_iter) == TxnErrorCode::TXN_OK
554- && ck_iter) {
553+ if (txn->get (ck_begin, ck_end, &ck_iter) == TxnErrorCode::TXN_OK && ck_iter) {
555554 // Trailing key layout: start_v(9) + end_v(9) = 18 bytes.
556555 int64_t best_start = INT64_MAX ;
557556 std::string best_val;
558557 while (ck_iter->has_next ()) {
559558 auto [k, v] = ck_iter->next ();
560559 if (k.size () < 18 ) continue ;
561560 std::string_view sv = k.substr (k.size () - 18 , 9 );
562- std::string_view ev = k.substr (k.size () - 9 , 9 );
561+ std::string_view ev = k.substr (k.size () - 9 , 9 );
563562 int64_t start_v = 0 , end_v = 0 ;
564563 if (decode_int64 (&sv, &start_v) != 0 ) continue ;
565- if (decode_int64 (&ev, &end_v) != 0 ) continue ;
564+ if (decode_int64 (&ev, &end_v) != 0 ) continue ;
566565 if (start_v <= version && version <= end_v) {
567566 if (start_v < best_start) {
568567 best_start = start_v;
569- best_val = std::string (v);
568+ best_val = std::string (v);
570569 }
571570 found_checkpoint = true ;
572571 }
@@ -605,8 +604,7 @@ void MetaServiceImpl::get_version_at_time(::google::protobuf::RpcController* con
605604 }
606605
607606 int64_t update_time_ms = -1 ;
608- int64_t version = resolve_version_at_time (txn.get (), instance_id,
609- request->partition_id (),
607+ int64_t version = resolve_version_at_time (txn.get (), instance_id, request->partition_id (),
610608 timestamp_ms, &update_time_ms);
611609 if (version == -2 ) {
612610 code = MetaServiceCode::KV_TXN_GET_ERR ;
@@ -626,10 +624,10 @@ void MetaServiceImpl::get_version_at_time(::google::protobuf::RpcController* con
626624 response->set_version_update_time_ms (update_time_ms);
627625}
628626
629- void MetaServiceImpl::disable_time_travel_table (
630- ::google::protobuf::RpcController* controller ,
631- const DisableTimeTravelTableRequest* request, DisableTimeTravelTableResponse* response,
632- ::google::protobuf::Closure* done) {
627+ void MetaServiceImpl::disable_time_travel_table (::google::protobuf::RpcController* controller,
628+ const DisableTimeTravelTableRequest* request ,
629+ DisableTimeTravelTableResponse* response,
630+ ::google::protobuf::Closure* done) {
633631 RPC_PREPROCESS (disable_time_travel_table, get, del);
634632
635633 if (!request->has_table_id () || request->table_id () <= 0 ) {
@@ -656,8 +654,7 @@ void MetaServiceImpl::disable_time_travel_table(
656654 err = txn->commit ();
657655 if (err != TxnErrorCode::TXN_OK ) {
658656 code = cast_as<ErrCategory::COMMIT >(err);
659- msg = fmt::format (" failed to remove time travel marker, table_id={} err={}" , table_id,
660- err);
657+ msg = fmt::format (" failed to remove time travel marker, table_id={} err={}" , table_id, err);
661658 return ;
662659 }
663660
0 commit comments