@@ -272,7 +272,7 @@ void LogTraffic(uint32_t id, bool has_more, absl::Span<RespExpr> resp,
272272
273273 // Write the data itself.
274274 array<iovec, 16 > blobs;
275- uint64_t index = 0 ;
275+ unsigned index = 0 ;
276276 if (next != stack_buf) {
277277 blobs[index++] = iovec{.iov_base = stack_buf, .iov_len = size_t (next - stack_buf)};
278278 }
@@ -538,7 +538,7 @@ void Connection::AsyncOperations::operator()(const PubMessage& pub_msg) {
538538 return ;
539539 }
540540
541- uint64_t i = 0 ;
541+ unsigned i = 0 ;
542542 array<string_view, 4 > arr;
543543 if (pub_msg.pattern .empty ()) {
544544 arr[i++] = pub_msg.is_sharded ? " smessage" : " message" ;
@@ -609,11 +609,11 @@ void UpdateLibNameVerMap(const string& name, const string& ver, int delta) {
609609}
610610} // namespace
611611
612- void Connection::Init (uint64_t io_threads) {
612+ void Connection::Init (unsigned io_threads) {
613613 CHECK (thread_queue_backpressure == nullptr );
614614 thread_queue_backpressure = new QueueBackpressure[io_threads];
615615
616- for (uint64_t i = 0 ; i < io_threads; ++i) {
616+ for (unsigned i = 0 ; i < io_threads; ++i) {
617617 auto & qbp = thread_queue_backpressure[i];
618618 qbp.publish_buffer_limit = GetFlag (FLAGS_publish_buffer_limit);
619619 qbp.pipeline_cache_limit = GetFlag (FLAGS_request_cache_limit);
@@ -861,7 +861,7 @@ void Connection::HandleRequests() {
861861 }
862862}
863863
864- uint64_t Connection::GetSendWaitTimeSec () const {
864+ unsigned Connection::GetSendWaitTimeSec () const {
865865 if (reply_builder_ && reply_builder_->IsSendActive ()) {
866866 return (util::fb2::ProactorBase::GetMonotonicTimeNs () - reply_builder_->GetLastSendTimeNs ()) /
867867 1'000'000'000 ;
@@ -877,11 +877,11 @@ void Connection::RegisterBreakHook(BreakerCb breaker_cb) {
877877pair<string, string> Connection::GetClientInfoBeforeAfterTid () const {
878878 if (!socket_) {
879879 LOG (DFATAL) << " unexpected null socket_ "
880- << " phase " << uint64_t (phase_) << " , is_http: " << unsigned (is_http_);
880+ << " phase " << unsigned (phase_) << " , is_http: " << unsigned (is_http_);
881881 return {};
882882 }
883883
884- CHECK_LT (uint64_t (phase_), NUM_PHASES);
884+ CHECK_LT (unsigned (phase_), NUM_PHASES);
885885
886886 string before;
887887 auto le = LocalBindStr ();
@@ -947,7 +947,7 @@ pair<string, string> Connection::GetClientInfoBeforeAfterTid() const {
947947 return {std::move (before), std::move (after)};
948948}
949949
950- string Connection::GetClientInfo (uint64_t thread_id) const {
950+ string Connection::GetClientInfo (unsigned thread_id) const {
951951 auto [before, after] = GetClientInfoBeforeAfterTid ();
952952 absl::StrAppend (&before, " tid=" , thread_id);
953953 absl::StrAppend (&before, after);
@@ -1213,7 +1213,7 @@ void Connection::DispatchSingle(bool has_more, absl::FunctionRef<void()> invoke_
12131213 }
12141214}
12151215
1216- Connection::ParserStatus Connection::ParseRedis (uint64_t max_busy_cycles) {
1216+ Connection::ParserStatus Connection::ParseRedis (unsigned max_busy_cycles) {
12171217 uint32_t consumed = 0 ;
12181218 RedisParser::Result result = RedisParser::OK;
12191219
@@ -1827,7 +1827,7 @@ bool Connection::Migrate(util::fb2::ProactorBase* dest) {
18271827Connection::WeakRef Connection::Borrow () {
18281828 DCHECK (self_);
18291829
1830- return {self_, uint64_t (socket_->proactor ()->GetPoolIndex ()), id_};
1830+ return {self_, unsigned (socket_->proactor ()->GetPoolIndex ()), id_};
18311831}
18321832
18331833void Connection::ShutdownThreadLocal () {
@@ -2095,7 +2095,7 @@ bool Connection::IsReplySizeOverLimit() const {
20952095}
20962096
20972097void Connection::UpdateFromFlags () {
2098- uint64_t tid = fb2::ProactorBase::me ()->GetPoolIndex ();
2098+ unsigned tid = fb2::ProactorBase::me ()->GetPoolIndex ();
20992099 thread_queue_backpressure[tid].pipeline_queue_max_len = GetFlag (FLAGS_pipeline_queue_limit);
21002100 thread_queue_backpressure[tid].pipeline_buffer_limit = GetFlag (FLAGS_pipeline_buffer_limit);
21012101 thread_queue_backpressure[tid].pipeline_cnd .notify_all ();
@@ -2126,11 +2126,11 @@ void Connection::TrackRequestSize(bool enable) {
21262126 }
21272127}
21282128
2129- void Connection::EnsureMemoryBudget (uint64_t tid) {
2129+ void Connection::EnsureMemoryBudget (unsigned tid) {
21302130 thread_queue_backpressure[tid].EnsureBelowLimit ();
21312131}
21322132
2133- Connection::WeakRef::WeakRef (const std::shared_ptr<Connection>& ptr, uint64_t thread_id,
2133+ Connection::WeakRef::WeakRef (const std::shared_ptr<Connection>& ptr, unsigned thread_id,
21342134 uint32_t client_id)
21352135 : ptr_{ptr}, last_known_thread_id_{thread_id}, client_id_{client_id} {
21362136}
0 commit comments