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(interactive): Support Statistics in Groot Storage #3856

Merged
merged 25 commits into from
Jun 14, 2024

Conversation

BingqingLyu
Copy link
Collaborator

What do these changes do?

As titled.

Related issue number

#3843

siyuan0322
siyuan0322 previously approved these changes May 30, 2024
Copy link
Collaborator

@longbinlai longbinlai left a comment

Choose a reason for hiding this comment

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

Please separate getting statistics from getting schema.

self.version
}

pub fn get_vertex_count(&self) -> i64 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why these counts all return i64 type?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is refined to be u64.

pub fn to_proto(&self) -> GraphResult<StatisticsPb> {
let mut pb = StatisticsPb::new();
pb.set_snapshotId(self.version);
pb.set_numVertices(self.vertex_count as u64);
Copy link
Collaborator

Choose a reason for hiding this comment

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

and these count u64?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes

throw new RuntimeException(e);
SnapshotId si = new SnapshotId(true, snapshotId);
IrGraphSchema irSchema = new IrGraphSchema(schema, true);
GraphStatistics statistics = this.schemaFetcher.getStatistics();
Copy link
Collaborator

Choose a reason for hiding this comment

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

It's not okay to place getting statistics with schema for now. For larger graph, getting statistics is a very time-costly operation, and it is operated at the frequency as schema? I don't think so.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We have separated the two interfaces for getting schema (+procedures) and statistics.

Committed-by: bingqing.lbq from Dev container
siyuan0322
siyuan0322 previously approved these changes Jun 11, 2024
Executors.newSingleThreadScheduledExecutor(
ThreadFactoryUtils.daemonThreadFactoryWithLogExceptionHandler(
"fetch-statistics", logger));
this.fetchStatisticsScheduler.scheduleWithFixedDelay(
Copy link
Collaborator

Choose a reason for hiding this comment

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

The fetching logic is a bit messy. The sendstatisticstofrontend can always be triggered after fetchstatistics from store, rather than two individual threads.

Copy link
Collaborator

@siyuan0322 siyuan0322 Jun 12, 2024

Choose a reason for hiding this comment

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

Fixed by triggering send after fetch, and send scheduler is removed.

@codecov-commenter
Copy link

codecov-commenter commented Jun 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 26.02%. Comparing base (00735b7) to head (db1f1d6).
Report is 10 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #3856       +/-   ##
===========================================
- Coverage   46.22%   26.02%   -20.21%     
===========================================
  Files         174      192       +18     
  Lines       16172    17357     +1185     
===========================================
- Hits         7476     4517     -2959     
- Misses       8696    12840     +4144     

see 83 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

Copy link
Collaborator

@longbinlai longbinlai left a comment

Choose a reason for hiding this comment

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

LGTM

@siyuan0322 siyuan0322 merged commit aa60805 into alibaba:main Jun 14, 2024
42 checks passed
@siyuan0322 siyuan0322 deleted the groot_statistics branch June 14, 2024 02:03
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.

4 participants