JanusGraph / janusgraph

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

Added retry logic if client request returns an error code that is configured for retrying #4409

Closed criminosis closed 4 months ago

criminosis commented 4 months ago

Closes #4408

To wait between retries since the code being called into Elasticsearch's client appears to be the synchronous API I opted for just using Thread.sleep. If there's a better utility or if a different approach is desired happy change.

Additionally I marked the new configuration options with the LOCAL flag. I noticed retry_on_conflict went with MASKABLE but it didn't seem readily apparent what further obligations would be needed to fulfill the "global" portion of that contract, so just figured it'd be best to start with LOCAL and ask about it in the PR.


Thank you for contributing to JanusGraph!

In order to streamline the review of the contribution we ask you to ensure the following steps have been taken:

For all changes:

For code changes:

For documentation related changes:

criminosis commented 4 months ago

@porunov yeah, I just focused on compilation passing to present the new signatures in case you had feedback or further modification, etc.

Fixed it all up, squashed and re-signed off again. Should be ready for review again 👍

criminosis commented 4 months ago

Thank you @porunov & @li-boxuan , glad to finally get to find something to contribute back to JanusGraph!

Out of curiosity I see it's been earmarked for the 1.1.0 milestone. Assuming the build completely passes and it gets merged will it go out into nightly build / release prior to the 1.1.0 release?

Looking forward to getting this my cluster to see if it helps the issue that originally prompted this.

porunov commented 4 months ago

Thank you @porunov & @li-boxuan , glad to finally get to find something to contribute back to JanusGraph!

Out of curiosity I see it's been earmarked for the 1.1.0 milestone. Assuming the build completely passes and it gets merged will it go out into nightly build / release prior to the 1.1.0 release?

Looking forward to getting this my cluster to see if it helps the issue that originally prompted this.

Yes. If everything passes the snapshot release is automatically created for each merged commit for any supported branches (master and v1.0 at the moment). You can read about snapshot releases here: https://docs.janusgraph.org/advanced-topics/commit-releases/