Skip to content

[couchbase] Ignore transient primary index creation error. - #4681

Merged
kiview merged 1 commit into
testcontainers:masterfrom
daschl:querytmp
Dec 10, 2021
Merged

kiview merged 1 commit into
testcontainers:masterfrom
daschl:querytmp

Conversation

@daschl

@daschl daschl commented Nov 17, 2021

Copy link
Copy Markdown
Member

This changeset makes sure that when a primary index is created, a transient
error is ignored since the indexing engine will automatically retry the
statement later.

Transient errors can happen because we just created the bucket and the
indexer might not have caught up to that bucket just yet, but it will
eventually.

A future improvement might grab some state before returning to the user
to ensure the index is created properly, but this should at least fix
the issue that some users are seeing in CI.

@daschl

daschl commented Nov 17, 2021

Copy link
Copy Markdown
Member Author

Actually, I might have figured out how to properly check before returning as well, so I'll add it to this change.

This changeset makes sure that when a primary index is created, a transient
error is ignored since the indexing engine will automatically retry the
statement later.

Transient errors can happen because we just created the bucket and the
indexer might not have caught up to that bucket just yet, but it will
eventually.

In addition, a check has been added afterwards to make sure that the
primary index is online (so, ready for the user to query) before
returning to the caller, improving the overall stability of queries.
@daschl

daschl commented Nov 17, 2021

Copy link
Copy Markdown
Member Author

Updated! Ready for review @kiview

@daschl

daschl commented Nov 29, 2021

Copy link
Copy Markdown
Member Author

@kiview @bsideup ping, I think this is ready to go.

@kiview kiview left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, there is really nothing Testcontainers specific about this and I trust you to know best how to deal with Couchbase 👍

@kiview kiview added this to the next milestone Dec 10, 2021
@kiview
kiview merged commit a715548 into testcontainers:master Dec 10, 2021
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.

2 participants