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

fix cross-close the underlying rocksdb session pool #598

Merged
merged 3 commits into from
Jul 9, 2019

Conversation

javeme
Copy link
Contributor

@javeme javeme commented Jul 1, 2019

fix: #597
Change-Id: I8b185cd7f81a9a04bc6fd971490ae887fd4ddbb5

private final AtomicInteger refCount;

public RocksDBStdSessions(HugeConfig config, String database, String store,
String dataPath,String walPath)
Copy link
Contributor

Choose a reason for hiding this comment

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

add an empty between args

this.rocksdb = origin.rocksdb;
this.sstFileManager = origin.sstFileManager;
this.cfs = origin.cfs;
this.refCount = origin.refCount;
Copy link
Contributor

Choose a reason for hiding this comment

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

this.refCount = origin.refCount.incrementAndGet();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They have to share the address of refCount

@codecov
Copy link

codecov bot commented Jul 1, 2019

Codecov Report

Merging #598 into master will increase coverage by 0.65%.
The diff coverage is 61.11%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #598      +/-   ##
============================================
+ Coverage     70.46%   71.11%   +0.65%     
- Complexity     3458     3497      +39     
============================================
  Files           216      216              
  Lines         16612    16637      +25     
  Branches       2367     2370       +3     
============================================
+ Hits          11705    11831     +126     
+ Misses         3658     3558     -100     
+ Partials       1249     1248       -1
Impacted Files Coverage Δ Complexity Δ
...gegraph/backend/store/rocksdb/RocksDBSessions.java 100% <ø> (ø) 1 <0> (ø) ⬇️
...h/backend/store/rocksdbsst/RocksDBSstSessions.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...raph/backend/store/rocksdbsst/RocksDBSstStore.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...e/src/main/java/com/baidu/hugegraph/HugeGraph.java 73.43% <100%> (+0.56%) 66 <2> (+2) ⬆️
.../hugegraph/backend/store/rocksdb/RocksDBStore.java 75.28% <70%> (+17.2%) 54 <1> (+11) ⬆️
...raph/backend/store/rocksdb/RocksDBStdSessions.java 70.24% <80%> (+0.7%) 29 <2> (+5) ⬆️
...om/baidu/hugegraph/backend/store/BackendTable.java 92% <0%> (-2%) 12% <0%> (ø)
...du/hugegraph/backend/tx/GraphIndexTransaction.java 79.52% <0%> (-0.48%) 146% <0%> (ø)
...va/com/baidu/hugegraph/backend/cache/RamCache.java 72.54% <0%> (+0.39%) 45% <0%> (+1%) ⬆️
... and 13 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 251be0c...c120381. Read the comment docs.

@javeme javeme force-pushed the rocksdb-instances-cross-close branch 3 times, most recently from af5167f to 3d7fe38 Compare July 2, 2019 13:51
javeme added 3 commits July 3, 2019 11:27
fix: #597
Change-Id: I8b185cd7f81a9a04bc6fd971490ae887fd4ddbb5
Change-Id: I151e112cb2e220d4a7b20da3e08b50d5f904516b
Change-Id: Idea99c81aeff21aa8f3d36ada6df240995a47023
@javeme javeme force-pushed the rocksdb-instances-cross-close branch from 3d7fe38 to c120381 Compare July 3, 2019 03:27
@zhoney zhoney merged commit 9a4c543 into master Jul 9, 2019
@zhoney zhoney deleted the rocksdb-instances-cross-close branch July 9, 2019 13:14
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.

The 'hugegraph' store of rocksdb has not been opened
3 participants