Skip to content

[FLINK-39334] set bypassDocumentValidation only if true#63

Open
jj314 wants to merge 1 commit into
apache:mainfrom
jj314:FLINK-39334
Open

[FLINK-39334] set bypassDocumentValidation only if true#63
jj314 wants to merge 1 commit into
apache:mainfrom
jj314:FLINK-39334

Conversation

@jj314
Copy link
Copy Markdown

@jj314 jj314 commented Apr 2, 2026

Setting bypassDocumentValidation is not allowed with unacknowledged write concern. Hence, this pull request changes the code so the option is only applied if bypassDocumentValidation is set to true by the client.

@boring-cyborg
Copy link
Copy Markdown

boring-cyborg Bot commented Apr 2, 2026

Thanks for opening this pull request! Please check out our contributing guidelines. (https://flink.apache.org/contributing/how-to-contribute.html)

@jj314
Copy link
Copy Markdown
Author

jj314 commented Apr 22, 2026

Hello @rmetzger thanks for running the workflow.

I think the reason for the failure in writeConcernZero test case might be that with write concern zero we don't wait for the write to be flushed and acknowledged. So when the assert happened the the write was not flushed yet and the document not visible.

According to MongoDB documentation the default commit interval is 100 ms. I saw in the logs that the time between the insert and the assertion failure was 10 ms in github CI. Locally where I could not reproduce the test faillure, 143 ms pass between the insert and the end of the test.

To make the test more consistent, I changed it so it checks repeatedly with a timeout of 10 seconds. Can you please try running the workflow again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant