Skip to content

Commit 9ea1aa0

Browse files
Automated g4 rollback of changelist 793486071.
*** Reason for rollback *** The latest LTS Abseil (lts_2025_05_12) does not support it yet. *** Original change description *** Fix 2 ClangInliner findings: * The use of this symbol has been deprecated and marked for inlining. The function being deprecated is absl::ReaderMutexLock::ReaderMutexLock. * The use of this symbol has been deprecated and marked for inlining. The function being deprecated is absl::WriterMutexLock::WriterMutexLock. *** PiperOrigin-RevId: 794871272
1 parent 056f43a commit 9ea1aa0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/prediction/user_history_predictor.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,15 +1122,17 @@ std::vector<Result> UserHistoryPredictor::Predict(
11221122
// MaybeProcessPartialRevertEntry is marked as const so
11231123
// as to access it Predict(), but it updates the contents of dic_, so
11241124
// WriterLock is required.
1125-
absl::WriterMutexLock lock(dic_mutex_);
1125+
// TODO(b/438604511): Use dic_mutex_ (w/o &) when Abseil LTS supports it.
1126+
absl::WriterMutexLock lock(&dic_mutex_);
11261127
MaybeProcessPartialRevertEntry(request);
11271128
}
11281129

11291130
// The const-method accessing the contents in `dic_` should be protected
11301131
// with ReaderLock, as the Entry in `dic_` may be updated in different thread.
11311132
// We wants to use ReaderLock instead of MutexLock as the
11321133
// actual decoding process is much slower than ReaderLock.
1133-
absl::ReaderMutexLock lock(dic_mutex_);
1134+
// TODO(b/438604511): Use dic_mutex_ (w/o &) when Abseil LTS supports it.
1135+
absl::ReaderMutexLock lock(&dic_mutex_);
11341136

11351137
if (!ShouldPredict(request)) {
11361138
return {};

0 commit comments

Comments
 (0)