-
Notifications
You must be signed in to change notification settings - Fork 33
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
Request index not exist handling #169
Conversation
flint-spark-integration/src/main/scala/org/opensearch/flint/spark/FlintSpark.scala
Outdated
Show resolved
Hide resolved
@@ -28,6 +33,7 @@ public void upsert(String id, String doc) { | |||
// also, failure to close the client causes the job to be stuck in the running state as the client resource | |||
// is not released. | |||
try (RestHighLevelClient client = flintClient.createClient()) { | |||
assertIndexExist(client, indexName); |
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.
@kaituo any other test cases we need to cover when write to query_execution_request index?
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.
We may also need to check request indexing mapping as we did in the result index mapping. This can be done once during REPL lifetime.
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.
Track in #172
flint-core/src/main/scala/org/opensearch/flint/core/storage/FlintOpenSearchClient.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Peng Huo <penghuo@gmail.com>
4d77ba4
to
6055e1a
Compare
@@ -46,7 +42,7 @@ object FlintREPL extends Logging with FlintJobExecutor { | |||
private val HEARTBEAT_INTERVAL_MILLIS = 60000L | |||
private val DEFAULT_INACTIVITY_LIMIT_MILLIS = 10 * 60 * 1000 | |||
private val MAPPING_CHECK_TIMEOUT = Duration(1, MINUTES) | |||
private val DEFAULT_QUERY_EXECUTION_TIMEOUT = Duration(10, MINUTES) | |||
private val DEFAULT_QUERY_EXECUTION_TIMEOUT = Duration(30, MINUTES) |
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.
Increase query execution timeout to 30mins.
| "lastUpdateTime": { | ||
| "type": "date", | ||
| "format": "strict_date_time||epoch_millis" | ||
| }, |
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.
Previously this was Long type? And should we add jobStartTime
here too?
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.
@@ -44,6 +48,7 @@ public void upsert(String id, String doc) { | |||
|
|||
public void update(String id, String doc) { | |||
try (RestHighLevelClient client = flintClient.createClient()) { | |||
assertIndexExist(client, indexName); |
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.
So this check is not required for Flint metadata log entry update?
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 found I didn't set refresh policy in create/update doc in FlintOpenSearchMetadataLog
. Could you help check if we should do .setRefreshPolicy(WriteRequest.RefreshPolicy.WAIT_UNTIL)
there as well?
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.
} else { | ||
String errorMsg = "Metadata log index not found " + metaLogIndexName; | ||
LOG.warning(errorMsg); | ||
throw new IllegalStateException(errorMsg); |
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.
where do you emit metrics QueryExecutionRequestIndexNotFound ?
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.
will add after metrics sink ready.
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.
track in here. #117
@@ -28,6 +33,7 @@ public void upsert(String id, String doc) { | |||
// also, failure to close the client causes the job to be stuck in the running state as the client resource | |||
// is not released. | |||
try (RestHighLevelClient client = flintClient.createClient()) { | |||
assertIndexExist(client, indexName); |
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.
We may also need to check request indexing mapping as we did in the result index mapping. This can be done once during REPL lifetime.
Signed-off-by: Peng Huo <penghuo@gmail.com>
Description
Detail info in #166
Issues Resolved
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.