-
Notifications
You must be signed in to change notification settings - Fork 221
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
Prepare to merge dqlite-next into master #642
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dqlite-next #642 +/- ##
============================================
Coverage 80.56% 80.56%
============================================
Files 196 196
Lines 28300 28304 +4
Branches 5297 5300 +3
============================================
+ Hits 22799 22804 +5
+ Misses 3808 3767 -41
- Partials 1693 1733 +40 ☔ View full report in Codecov by Sentry. |
@just-now I think this is good to go, would appreciate you confirming that I didn't miss anything important when adding ifdefs. |
176b4fb
to
dbdf8fc
Compare
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 is a little bit tricky to review but I tried to have master
and this PR side by side to see if they had the same behavior when DQLITE_NEXT
was not defined. Looks good to me apart from one comment I included, thanks!
@@ -186,9 +188,11 @@ int dqlite__init(struct dqlite_node *d, | |||
err_after_raft_transport_init: | |||
raftProxyClose(&d->raft_transport); | |||
err_after_pool_init: | |||
#ifdef DQLITE_NEXT | |||
pool_close(&d->pool); | |||
pool_fini(&d->pool); | |||
err_after_loop_init: |
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.
I may be wrong here but I think the label that exists in master
at the moment is err_after_loop_init
so the if def should be:
....
err_after_raft_transport_init:
raftProxyClose(&d->raft_transport);
#ifdef DQLITE_NEXT
err_after_pool_init:
pool_close(&d->pool);
pool_fini(&d->pool);
#endif
err_after_loop_init:
uv_loop_close(&d->loop);
....
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.
That way of doing it doesn't quite work as-is because on dqlite-next there is a goto err_after_pool_init
in the error branch after raftProxyInit
above. We would have to change that to
rv = raftProxyInit(&d->raft_transport, &d->loop);
if (rv != 0) {
#ifdef DQLITE_NEXT
goto err_after_pool_init;
#else
goto err_after_loop_init;
#endif
}
The way I've written it looks kind of weird but gets away with only one ifdef
, which I think is nice. Thoughts?
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.
Looks good to me.
Signed-off-by: Cole Miller <[email protected]>
Signed-off-by: Cole Miller <[email protected]>
Signed-off-by: Cole Miller <[email protected]>
Signed-off-by: Cole Miller <[email protected]>
Signed-off-by: Cole Miller <[email protected]>
I don't see the point of testing without LIBDQLITE_TRACE in the environment. Signed-off-by: Cole Miller <[email protected]>
Signed-off-by: Cole Miller <[email protected]>
Let's not make users of stable dqlite pay this cost in startup time and thread count. Signed-off-by: Cole Miller <[email protected]>
Signed-off-by: Cole Miller <[email protected]>
Signed-off-by: Cole Miller <[email protected]>
Let's do all our work on one branch, with experimental stuff (like thread pool and vfs2 integration) guarded behind
#ifdef DQLITE_NEXT
. This will avoid a big merge headache down the line.Signed-off-by: Cole Miller [email protected]