-
Notifications
You must be signed in to change notification settings - Fork 425
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
Switch OTLP endpoints to ingest v2 #5283
Conversation
Integration tests for OTLP are hanging on shutdown
Likely related to #5068 |
After some further analysis, it seems that the ingester decomissioning freeze happens when we stop the cluster right after the first ingestions. Likely race condition:
|
Adding a wait after the ingest to give time to the control plane to schedule an indexing pipeline works but:
This can be reproduced with: cargo test --package quickwit-integration-tests --lib --all-features --tests::index_tests::test_ingest_logs_with_otlp_grpc_api --exact --show-output Note: in the |
Note: the issue mentioned above
was not addressed. I didn't manage to consistently reproduce or get more logs. |
0c141e2
to
558b551
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.
See comments.
for span in spans { | ||
if let Err(error) = doc_batch_builder.ingest_doc(&span.0) { | ||
let doc_uid = doc_uid_generator.next_doc_uid(); | ||
if let Err(error) = doc_batch_builder.add_doc(doc_uid, span.0) { |
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.
idea: we could have a add_json_doc
function on the DocBatchV2Builder
.
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 copied over the JsonDocBatchBuilder
logic from V1. To use DocBatchV2Builder
directly, we would either:
- need to first serialize the struct then add thoses bytes to the
BytesMut
, but that means an extra copy - also use a
Writer<BytesMut>
inDocBatchV2Builder
, but I think it is not 0 cost, otherwise it would have been done that way in V1 (going through the writer involves some extra if statements)
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.
Following the other review comments, I simplified the JsonDocBatchV2Builder
as much as possible by avoiding the unnecessary forth and back with DocBatchV2Builder
. I would prefer not to unify the two structures without ensuring that there isn't a performance impact as this is on the critical write path. But measuring this could be a bit complicated. What do you think?
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.
fine for me!
c138545
to
6a09749
Compare
7d58051
to
51122c4
Compare
Description
Closes #5209
How was this PR tested?
Integration tests