-
Notifications
You must be signed in to change notification settings - Fork 5
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
Skip server-only processing in client calls to update_indexes_from_txn_log() #1430
Conversation
@@ -7,6 +7,9 @@ | |||
#include "db_helpers.hpp" | |||
#include "db_shared_data.hpp" | |||
|
|||
const bool gaia::db::c_is_running_on_server = false; |
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.
Can these be constexpr
, or not?
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'm not sure. I assumed not, because they're extern
, but I didn't try - I'll try now...
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 doesn't work:
error: constexpr variable declaration must be a definition
Given that we need to separate the definition from the declaration, we need to go with const
.
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'm still very confused about the client-side indexes, but this looks good. Looks like there's nothing in your changes that's client-only, just server-only?
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.
LGTM!
Yes, I don't have something just for client right now. I've just excluded some unnecessary checks from being done on the client. The next change may involve some client-only changes, but they'll probably depend on other client-side variables, so I may not have to use the new booleans. BTW, I added two of them, just to avoid having to deal with negations. |
d53ea8f
to
5ea20ca
Compare
Also added two constants to simplify checks about whether code is executed on server or client and re-formatted some long lines in the touched files.