Skip to content

Implement a ThreadLocalCache to improve read perf#1155

Closed
Linary wants to merge 2 commits intomasterfrom
threadlocal-cache
Closed

Implement a ThreadLocalCache to improve read perf#1155
Linary wants to merge 2 commits intomasterfrom
threadlocal-cache

Conversation

@Linary
Copy link
Copy Markdown
Contributor

@Linary Linary commented Aug 25, 2020

Change-Id: I372fb5a56f374fc3993d8bdcbbb0ef07b5f160c7


@Override
protected boolean write(K id, V value) {
this.getOrNewCache();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

check capacity and throw if ooc

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 27, 2020

Codecov Report

Merging #1155 into master will increase coverage by 35.90%.
The diff coverage is 0.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master    #1155       +/-   ##
=============================================
+ Coverage     29.65%   65.56%   +35.90%     
- Complexity      263     5654     +5391     
=============================================
  Files            75      358      +283     
  Lines          4208    28967    +24759     
  Branches        510     4059     +3549     
=============================================
+ Hits           1248    18992    +17744     
- Misses         2797     8089     +5292     
- Partials        163     1886     +1723     
Impacted Files Coverage Δ Complexity Δ
...om/baidu/hugegraph/backend/cache/CacheManager.java 71.42% <0.00%> (ø) 12.00 <0.00> (?)
...baidu/hugegraph/backend/cache/OptimisticCache.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...aidu/hugegraph/backend/cache/ThreadLocalCache.java 0.00% <0.00%> (ø) 0.00 <0.00> (?)
...aidu/hugegraph/backend/store/raft/RaftClosure.java 0.00% <0.00%> (ø) 0.00% <0.00%> (?%)
...va/com/baidu/hugegraph/analyzer/JcsegAnalyzer.java 78.94% <0.00%> (ø) 4.00% <0.00%> (?%)
...ugegraph/backend/serializer/SerializerFactory.java 89.65% <0.00%> (ø) 10.00% <0.00%> (?%)
...h/job/computer/WeakConnectedComponentComputer.java 0.00% <0.00%> (ø) 0.00% <0.00%> (?%)
...ackend/store/cassandra/CassandraEntryIterator.java 86.66% <0.00%> (ø) 20.00% <0.00%> (?%)
...egraph/backend/store/mysql/MysqlStoreProvider.java 100.00% <0.00%> (ø) 6.00% <0.00%> (?%)
...du/hugegraph/backend/store/hbase/HbaseMetrics.java 0.00% <0.00%> (ø) 0.00% <0.00%> (?%)
... and 280 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 accc27f...88aaaba. Read the comment docs.

Change-Id: I372fb5a56f374fc3993d8bdcbbb0ef07b5f160c7
Change-Id: Id3a39da5cc683fc90f07ad5b8eaae9db5eb9244d
@Linary
Copy link
Copy Markdown
Contributor Author

Linary commented Sep 22, 2020

After the loader performance test, there is no obvious performance improvement for the two caches, so close this pr

@Linary Linary closed this Sep 22, 2020
@Linary Linary deleted the threadlocal-cache branch September 22, 2020 03:22
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.

2 participants