I implemented the code according to #2408 , and found an unexpected situation:
There are two parallel PostgreSQL backend processes, each adding a few documents. When the first process commits, it succeeds, but when the subsequent process attempts to commit, there are three possible outcomes:
Most likely, it will fail with the error message "TantivyError(OpenReadError(FileDoesNotExist('.../tantivy/c09b2bdff65a4c4aa64394d180932812.fieldnorm')))".
Occasionally, it will succeed and data will be written successfully.
It won't throw an error, but some of the data will be invisible (indicating write failure).
The modification I made to tantivy::IndexWriter was to remove the logic related to INDEX_WRITER_LOCK upon initialization of this object; everything else remained unchanged. Moreover, my understanding is that the fieldnorm file should be related to the segment of the current transaction. Why would committing in other concurrent processes affect the fieldnorm of this transaction?
I implemented the code according to #2408 , and found an unexpected situation: There are two parallel PostgreSQL backend processes, each adding a few documents. When the first process commits, it succeeds, but when the subsequent process attempts to commit, there are three possible outcomes:
The modification I made to tantivy::IndexWriter was to remove the logic related to INDEX_WRITER_LOCK upon initialization of this object; everything else remained unchanged. Moreover, my understanding is that the fieldnorm file should be related to the segment of the current transaction. Why would committing in other concurrent processes affect the fieldnorm of this transaction?