JanusGraph / janusgraph

JanusGraph: an open-source, distributed graph database
https://janusgraph.org
Other
5.26k stars 1.16k forks source link

Implement Retry Logic For Elasticsearch Requests #4408

Closed criminosis closed 4 months ago

criminosis commented 4 months ago

Describe the feature: JG views writes to mixed indices as a "best effort" and documents that failures in transactions with regards to mixed indices are left to a separate periodic clean up process after enabling JG's WAL.

However this results in clients not getting feedback for more mundane write failures to mixed indices like Elasticsearch like a 429 Too Many Requests that just need to respect the backpressure being conveyed by Elasticsearch and retry again.

Elasticsearch's guidance states that 429 errors in particular are the client's responsibility.

To implement this feature would require implementing retry logic around this callsite. Additionally supporting some new config settings for Elasticsearch:

Describe a specific use case for the feature: Once this feature is implemented it'll make writes to Elasticsearch better handle write errors like 429 during high write periods instead of silently failing the write and users of JanusGraph needing to be aware of the WAL & separate periodic repair application.