retry postgres driver msg row insert on fail#3659
Conversation
|
This PR may contain changes to database schema of one of the drivers. If you are introducing any changes to the schema, make sure the upgrade from the latest release to this change passes without any errors/issues. Please make sure the label |
|
You can find the image built from this PR at Built from a96d1f2 |
Ivansete-status
left a comment
There was a problem hiding this comment.
LGTM! Thanks for it! 🙌
Another possible option would be to perform await until a valid partition is available. Notice that we have all the partition info from self.partitionMngr
Cheers
Sounds better, I'll try that! |
|
Replaced by #3673 |
Description
Messaging tests (such as
tests/waku_archive/test_driver_postgres_query.nim) can temporarily fail if a new partition in the DB is not created in time. This is ̶v̶e̶r̶y̶ ̶d̶i̶f̶f̶i̶c̶u̶l̶t̶ ̶t̶o̶ ̶r̶e̶p̶r̶o̶d̶u̶c̶e̶ unlikely happen when running the test suite, but it can happen (the insert can jump ahead of the partition creation by a few milliseconds).Changes
The proposal in this PR is to just simply and inexpensively retry
PostgresDriver.putfive times for a second before failing the operation.Issue
Maintenance Y2025H2 #3483