-
Notifications
You must be signed in to change notification settings - Fork 59
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
external index server in bgworker #355
Conversation
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.
PR Summary
Hi! Looks like you've reached your API usage limit. You can increase it from your account settings page here: app.greptile.com/settings/usage
30 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
8c40d36
to
e1732ed
Compare
Codecov ReportAttention: Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
small questions, but overall looks good.
/* ========================================================== */ | ||
|
||
if BackgroundWorker::sighup_received() && !ENABLE_INDEXING_SERVER.get() { | ||
std::process::exit(1); |
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 are we exiting with an error code when the external indexing is not enabled?
afaik this causes a postmaster restart, no? is that expected?
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 because if the bgworker exits with 0 status it won't be restarted automatically and will be unregistered from postmaster. By exiting the process we make sure that any threads created by this process will be killed and as it exits with non-zero code, it will be restarted after the configured bgw_restart_time
. After boot it won't start the indexing server (as GUC will be set to false) and will wait for SIGHUP in wait_latch loop, to start in case the lantern_extras.enable_indexing_server
will be set to true again.
Ref to docs: https://www.postgresql.org/docs/current/bgworker.html#:~:text=If%20bgw_restart_time%20for,itself%20has%20terminated.
lantern_hnsw/src/hnsw.c
Outdated
PG_RETURN_NULL(); | ||
} | ||
|
||
// todo:: remove in 0.4.3 |
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.
should be 0.5.1 or 0.6.0
lantern_hnsw/src/hnsw/build.c
Outdated
@@ -486,6 +486,12 @@ static void BuildIndex(Relation heap, Relation index, IndexInfo *indexInfo, ldb_ | |||
|
|||
InitBuildState(buildstate, heap, index, indexInfo); | |||
|
|||
if(buildstate->index_file_path) { | |||
elog(ERROR, | |||
"Importing index from file is deprecated.\n" |
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.
deprecated makes it sound like the functionality still exists, but we have removed the functionality already.
Rephrase to "Importing index from file is no longer supported"
8ca0d74
to
c0dfbbe
Compare
c0dfbbe
to
99625f4
Compare
lantern.external_index_secure=false
by default, so it will correctly connect to background worker.