This is an automated email from the ASF dual-hosted git repository.
laiyingchun pushed a commit to branch v2.5
in repository https://gitbox.apache.org/repos/asf/incubator-pegasus.git
The following commit(s) were added to refs/heads/v2.5 by this push:
new d59b7579d fix(logging): remove too verbose log when key not found
(#1829) (#1830)
d59b7579d is described below
commit d59b7579df83784a53f006cb3d5cd51c64dc0ff4
Author: Yingchun Lai <[email protected]>
AuthorDate: Thu Jan 4 20:59:26 2024 +0800
fix(logging): remove too verbose log when key not found (#1829) (#1830)
Don't log "client read encountered an unhandled error: 1" when the key is
not found.
---
src/replica/replica.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/replica/replica.cpp b/src/replica/replica.cpp
index 6184af3b7..f230d4177 100644
--- a/src/replica/replica.cpp
+++ b/src/replica/replica.cpp
@@ -298,7 +298,10 @@ void replica::on_client_read(dsn::message_ex *request,
bool ignore_throttling)
uint64_t start_time_ns = dsn_now_ns();
CHECK(_app, "");
auto storage_error = _app->on_request(request);
- if (dsn_unlikely(storage_error != ERR_OK)) {
+ // kNotFound is normal, it indicates that the key is not found (including
expired)
+ // in the storage engine, so just ignore it.
+ if (dsn_unlikely(storage_error != rocksdb::Status::kOk &&
+ storage_error != rocksdb::Status::kNotFound)) {
switch (storage_error) {
// TODO(yingchun): Now only kCorruption and kIOError are dealt,
consider to deal with
// more storage engine errors.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]