songgaoye opened a new pull request, #3769:
URL: https://github.com/apache/brpc/pull/3769

   ### What problem does this PR solve?
   
   Issue Number: resolve
   
   Problem Summary:
   
   Couchbase manifest-cache paths sometimes look up the same key multiple times.
   Collection ID lookup calls `find()` and then `operator[]` for both the scope
   and collection. The local manifest update path similarly repeats bucket
   lookups.
   
   ### What is changed and the side effects?
   
   Changed:
   
   - Reuse the iterators returned by `find()` in the collection ID lookup and
     local manifest update paths.
   - Use `emplace()` to add a missing local manifest.
   - Add a test covering collection cache hits, misses, and unchanged cache 
state
     after a miss.
   
   Side effects:
   
   - Performance effects: Successful collection ID lookups avoid two repeated 
map
     lookups. The performance impact has not been benchmarked.
   
   - Breaking backward compatibility: None. Cache lookup and update behavior
     remains unchanged.
   
   ---
   ### Check List:
   
   - Built `brpc_couchbase_unittest` and passed all 7 `CouchbaseUnitTest` tests.
   - Added coverage for local collection cache lookup.
   - Please follow [Contributor Covenant Code of 
Conduct](https://github.com/apache/brpc/blob/master/CODE_OF_CONDUCT.md).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to