Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve CachedGraphTransaction perf #1743

Merged
merged 1 commit into from
Feb 15, 2022
Merged

improve CachedGraphTransaction perf #1743

merged 1 commit into from
Feb 15, 2022

Conversation

javeme
Copy link
Contributor

@javeme javeme commented Jan 26, 2022

Change-Id: I9f60f68d2faedb099e89adc2b1c1f4948d177a40

Change-Id: I9f60f68d2faedb099e89adc2b1c1f4948d177a40
@codecov
Copy link

codecov bot commented Jan 26, 2022

Codecov Report

Merging #1743 (cae2da7) into master (cadeade) will increase coverage by 0.06%.
The diff coverage is 72.09%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1743      +/-   ##
============================================
+ Coverage     70.78%   70.85%   +0.06%     
- Complexity      970      972       +2     
============================================
  Files           443      443              
  Lines         37704    37729      +25     
  Branches       5370     5378       +8     
============================================
+ Hits          26689    26731      +42     
+ Misses         8318     8293      -25     
- Partials       2697     2705       +8     
Impacted Files Coverage Δ
...om/baidu/hugegraph/backend/query/QueryResults.java 70.24% <ø> (+8.26%) ⬆️
...ugegraph/backend/cache/CachedGraphTransaction.java 85.40% <67.56%> (-4.36%) ⬇️
...om/baidu/hugegraph/backend/cache/CacheManager.java 88.33% <100.00%> (+1.29%) ⬆️
...m/baidu/hugegraph/backend/tx/GraphTransaction.java 80.36% <0.00%> (+0.20%) ⬆️
...om/baidu/hugegraph/task/StandardTaskScheduler.java 76.34% <0.00%> (+0.24%) ⬆️
...in/java/com/baidu/hugegraph/api/graph/EdgeAPI.java 64.76% <0.00%> (+1.03%) ⬆️
.../baidu/hugegraph/backend/tx/SchemaTransaction.java 91.39% <0.00%> (+1.22%) ⬆️
...va/com/baidu/hugegraph/util/collection/IntMap.java 74.00% <0.00%> (+1.59%) ⬆️
...va/com/baidu/hugegraph/task/ServerInfoManager.java 81.46% <0.00%> (+1.68%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cadeade...cae2da7. Read the comment docs.

@@ -111,6 +111,8 @@ private void tick(String name, Cache<Id, Object> cache) {
public <V> Cache<Id, V> cache(String name, long capacity) {
if (!this.caches.containsKey(name)) {
this.caches.putIfAbsent(name, new RamCache(capacity));
LOG.info("Init RamCache for '{}' with capacity {}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we use info for it (or use debug) ? like the first time fulfill cache

and RamCache seems not clearly compare to OffHeapCache? (level cache also have this problem)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a frequent action, and just log for 3 cache entrances(cache/offheapCache/levelCache).

RamCache may be renamed HeapCache in the future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, use HeapCache or InHeapCache is more readable

@javeme javeme merged commit 72baa12 into master Feb 15, 2022
@javeme javeme deleted the cache-tx-improve branch February 15, 2022 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants