Skip to content

Fix #558, wait for cluster to be initialized when reading stream data(#656)#659

Merged
MeirShpilraien merged 1 commit into1.0from
cherrypick_558_to_1.0
Jan 10, 2022
Merged

Fix #558, wait for cluster to be initialized when reading stream data(#656)#659
MeirShpilraien merged 1 commit into1.0from
cherrypick_558_to_1.0

Conversation

@MeirShpilraien
Copy link

On oss cluster, if cluster is not initialized, read commands will failed and return an error. On stream reader, we assert that we read the stream successfully, such assertion will failed on uninitialized cluster and will cause a crash.

Solution:

  1. Before start scaning for streams, wait for cluster to be initialized.
  2. '1' is not enough, by the time we find a stream to read the cluster might get uninitialized again. To solve this, if we failed to read the stream we retry after 5 seconds. We retry up to 10 times and than abort.

(cherry picked from commit fb9f1cc)

…#656)

On oss cluster, if cluster is not initialized, read commands will failed
and return an error. On stream reader, we assert that we read the stream
successfully, such assertion will failed on uninitialized cluster
and will cause a crash.

Solution:
1. Before start scaning for streams, wait for cluster to be initialized.
2. '1' is not enough, by the time we find a stream to read the cluster
   might get uninitialized again. To solve this, if we failed to read
   the stream we retry after 5 seconds. We retry up to 10 times and than
   abort.

(cherry picked from commit fb9f1cc)
@MeirShpilraien MeirShpilraien requested a review from chayim January 10, 2022 08:29
@MeirShpilraien MeirShpilraien merged commit ffc4d1f into 1.0 Jan 10, 2022
@MeirShpilraien MeirShpilraien deleted the cherrypick_558_to_1.0 branch January 10, 2022 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants