Skip to content

Conversation

@siyuan0322
Copy link
Collaborator

No description provided.

@siyuan0322 siyuan0322 requested a review from Copilot April 1, 2025 07:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes several sporadic bugs in the groot project by updating the Kafka log reading API usage and modifying RocksDB operations.

  • Update test and processing code to use ConsumerRecord based API instead of deprecated ReadLogEntry.
  • Adjust KafkaLogReader error handling in polling and modify RocksDB background work cancellation with a blocking sleep.
  • Update Cargo.toml to include an additional RocksDB feature.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
interactive_engine/groot-server/src/test/java/com/alibaba/graphscope/groot/tests/common/wal/kafka/KafkaWalTest.java Updated tests to use ConsumerRecord API instead of ReadLogEntry.
interactive_engine/groot-module/src/main/java/com/alibaba/graphscope/groot/wal/kafka/KafkaLogReader.java Modified reading logic with try-catch handling for Kafka polling and updated offset check.
interactive_engine/groot-module/src/main/java/com/alibaba/graphscope/groot/store/KafkaProcessor.java Adapted log processing to use ConsumerRecord.
interactive_engine/groot-module/src/main/java/com/alibaba/graphscope/groot/frontend/write/KafkaAppender.java Updated log reading code to use the new API.
interactive_engine/executor/store/groot/src/db/storage/rocksdb.rs Revised RocksDB handling by canceling background work and introducing a sleep delay.
interactive_engine/executor/store/groot/src/db/graph/store.rs Tweaked consistency check in snapshot guard with a tolerance range.
interactive_engine/executor/store/groot/Cargo.toml Enabled additional RocksDB feature to support multi-threaded column families.
Comments suppressed due to low confidence (1)

interactive_engine/groot-module/src/main/java/com/alibaba/graphscope/groot/wal/kafka/KafkaLogReader.java:134

  • The catch block in the readNextRecord method adjusts the consumer offset by moving to cur + 1 on a poll failure, which may inadvertently skip records. Please verify that this behavior is intentional and that it does not compromise message ordering or data integrity.
            } catch (KafkaException ex) {

Comment on lines 90 to 91
std::thread::sleep(Duration::from_secs(30));
drop(prev);
Copy link

Copilot AI Apr 1, 2025

Choose a reason for hiding this comment

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

The introduction of a blocking sleep for 30 seconds after canceling background work can significantly impact performance. Consider whether this delay is necessary or if a non-blocking or asynchronous approach might be more appropriate.

Suggested change
std::thread::sleep(Duration::from_secs(30));
drop(prev);
let prev_clone = prev.clone();
std::thread::spawn(move || {
std::thread::sleep(Duration::from_secs(30));
drop(prev_clone);
});

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2025

Please check the preview of the documentation changes at
https://f5145340.graphscope-docs-preview.pages.dev

@github-actions github-actions bot added the stale label May 12, 2025
@github-actions
Copy link
Contributor

/cc @yecol @sighingnow, this issus/pr has had no activity for a long time, please help to review the status and assign people to work on it.

@codecov-commenter
Copy link

codecov-commenter commented Jun 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 33.02%. Comparing base (f8b5d69) to head (109ad50).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4595      +/-   ##
==========================================
- Coverage   35.01%   33.02%   -2.00%     
==========================================
  Files         127      127              
  Lines       13299    13299              
==========================================
- Hits         4657     4392     -265     
- Misses       8642     8907     +265     

see 12 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 02d59f6...109ad50. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@siyuan0322 siyuan0322 merged commit e512820 into alibaba:main Jun 5, 2025
38 of 40 checks passed
@siyuan0322 siyuan0322 deleted the zsy/fix-groot branch June 5, 2025 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants