-
Notifications
You must be signed in to change notification settings - Fork 706
feat: java frontend passes epoch to cn #406
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
Conversation
dfc2e27 to
7725946
Compare
0a1bcb3 to
5b11365
Compare
Codecov Report
@@ Coverage Diff @@
## main #406 +/- ##
============================================
- Coverage 73.12% 73.01% -0.11%
- Complexity 2709 2711 +2
============================================
Files 864 869 +5
Lines 48411 48492 +81
Branches 1551 1553 +2
============================================
+ Hits 35399 35406 +7
- Misses 12203 12277 +74
Partials 809 809
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
5b11365 to
e720bd7
Compare
e720bd7 to
ee41d22
Compare
skyzh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The overall logic LGTM. But I'm not an expert on Java, and we need another reviewer for this PR.
| LOGGER.info("Creating hummock snapshot manager."); | ||
| String address = config.get(FrontendServerConfigurations.META_SERVICE_ADDRESS); | ||
| DefaultWorkerNode node = DefaultWorkerNode.from(address); | ||
| MetaClient client = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not share the same meta client instance with createStreamManager?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I prefer MetaClientManager to be passed to callers who need MetaClient. The MetaClientManager should handle underlying channel reconnection stuffs, and the callers just calls getOrCreate to obtain a client using up-to-date channel each time.
But as channel reconnection is not in current codebase and we are moving towards rust frontend, a shared meta client instance is fine.
|
|
||
| import com.risingwave.common.exception.PgErrorCode | ||
| import com.risingwave.common.exception.PgException | ||
| import com.risingwave.proto.hummock.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not good practice to import * in java.
What's changed and what's your intention?
TODO:
Checklist
Refer to a related PR or issue link (optional)
close #384