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

Add system schema store #1533

Closed
wants to merge 6 commits into from
Closed

Add system schema store #1533

wants to merge 6 commits into from

Conversation

Linary
Copy link
Contributor

@Linary Linary commented Jul 1, 2021

Change-Id: I2feabace71f266d6be6c2094c30cd19f74ab7f7d

@Linary Linary force-pushed the system-store branch 2 times, most recently from f1c4fc0 to 4cd1edb Compare July 2, 2021 03:01
@Linary Linary force-pushed the system-store branch 3 times, most recently from 6250a6e to 9541494 Compare July 6, 2021 06:52
@codecov
Copy link

codecov bot commented Jul 6, 2021

Codecov Report

Merging #1533 (faf6b99) into master (153fa5e) will increase coverage by 1.80%.
The diff coverage is 61.45%.

@@             Coverage Diff              @@
##             master    #1533      +/-   ##
============================================
+ Coverage     57.98%   59.78%   +1.80%     
- Complexity     6108     6230     +122     
============================================
  Files           412      413       +1     
  Lines         33648    33857     +209     
  Branches       4633     4647      +14     
============================================
+ Hits          19511    20242     +731     
+ Misses        12097    11514     -583     
- Partials       2040     2101      +61     
Impacted Files Coverage Δ
...raph/backend/store/cassandra/CassandraMetrics.java 0.00% <0.00%> (ø)
...e/src/main/java/com/baidu/hugegraph/HugeGraph.java 65.30% <ø> (ø)
...du/hugegraph/backend/cache/CachedBackendStore.java 9.09% <0.00%> (-0.29%) ⬇️
...om/baidu/hugegraph/backend/store/BackendStore.java 80.76% <ø> (ø)
...hugegraph/backend/store/raft/RaftBackendStore.java 0.00% <0.00%> (ø)
...h/backend/store/raft/RaftBackendStoreProvider.java 0.00% <0.00%> (ø)
...ugegraph/backend/store/raft/RaftSharedContext.java 0.00% <0.00%> (ø)
...m/baidu/hugegraph/backend/tx/GraphTransaction.java 79.84% <ø> (ø)
...n/java/com/baidu/hugegraph/config/CoreOptions.java 99.44% <ø> (-0.02%) ⬇️
...src/main/java/com/baidu/hugegraph/util/Events.java 0.00% <ø> (ø)
... and 54 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 153fa5e...faf6b99. Read the comment docs.

@Linary Linary force-pushed the system-store branch 3 times, most recently from a80b302 to 68c4724 Compare July 6, 2021 08:15
javeme
javeme previously approved these changes Jul 7, 2021
Linary added 5 commits July 7, 2021 18:32
Change-Id: I2feabace71f266d6be6c2094c30cd19f74ab7f7d
Change-Id: Idb4d3bffcb1cd941bd8a533981d5ab3d479f4069
Change-Id: Ibc4213370d3134ece10eb60830dad25b5bc208b1
Change-Id: I1460e49c4ffb96f49df713a5ae0c845367c67a22
Change-Id: I538714f0b5ee3a8e90aa90db8f43f4b1cc0597d6
Change-Id: I5c9d65c4ae022cb84592e8f2aa57bd7485cd12e4
@github-actions
Copy link

Due to the lack of activity, the current pr is marked as stale and will be closed after 180 days, any update will remove the stale label

@Linary
Copy link
Contributor Author

Linary commented Aug 19, 2021

To updated

@github-actions github-actions bot removed the inactive label Aug 19, 2021
@github-actions
Copy link

Due to the lack of activity, the current pr is marked as stale and will be closed after 180 days, any update will remove the stale label

@imbajin imbajin added the feature New feature label Oct 8, 2021
@@ -39,11 +41,22 @@ public void registerMetaHandler(String name, MetaHandler<Session> handler) {
this.dispatcher.registerMetaHandler(name, handler);
}

@Override
public String storedVersion() {
Copy link
Contributor

Choose a reason for hiding this comment

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

storedVersion() is only implemented in system store?

@@ -540,5 +540,45 @@ public long getCounter(HugeType type) {
throw new UnsupportedOperationException(
"HbaseGraphStore.getCounter()");
}

public Session getSession() {
Copy link
Contributor

Choose a reason for hiding this comment

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

can just use this instead?

public void init() {
super.init();
super.checkOpened();
Session session = super.getSession();
Copy link
Contributor

Choose a reason for hiding this comment

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

can use Session session = super.sessions.session();

@Override
public String storedVersion() {
super.checkOpened();
Session session = super.getSession();
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

String driverVersion = this.provider().driverVersion();
this.meta.writeVersion(session, driverVersion);
LOG.info("Write down the backend version: {}", driverVersion);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

also overwrite truncate() and let it truncate other tables except the meta table

public String storedVersion() {
this.checkOpened();
CassandraSessionPool.Session session = this.getSession();
return this.meta.readVersion(session);
Copy link
Contributor

Choose a reason for hiding this comment

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

seems server-info can also be stored into meta table

}
}

public static class CassandraSystemStore extends CassandraGraphStore {
Copy link
Contributor

Choose a reason for hiding this comment

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

prefer to add CassandraMetaStore extends CassandraStore and it don't need to call registerTableManager(HugeType.VERTEX,...), since tasks data in CassandraSystemStore need to be truncate.

@Linary Linary closed this May 15, 2022
@javeme javeme reopened this May 15, 2022
@javeme javeme mentioned this pull request May 20, 2022
@javeme javeme closed this in #1891 Jun 2, 2022
@imbajin imbajin deleted the system-store branch October 26, 2023 06:26
@imbajin imbajin restored the system-store branch October 26, 2023 06:26
@imbajin imbajin deleted the system-store branch October 26, 2023 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants