Skip to content

Fix so new connections are only added as backend connections after they are 'ready' - #133

Merged
Nielswps merged 1 commit into
mainfrom
seblund-patch-1
Feb 23, 2023
Merged

Fix so new connections are only added as backend connections after they are 'ready'#133
Nielswps merged 1 commit into
mainfrom
seblund-patch-1

Conversation

@seblund

@seblund seblund commented Feb 22, 2023

Copy link
Copy Markdown
Member

New connections are added to the backend connections here:

addBackendConnection(newConnection);

But that is before the updateComponents query has completed, so a query can take the backend before it is ready. This results in a bunch of non-deterministic errors when executing queries, one being the UNAVAILABLE: io exception error.

The backend should only be added on the onCompleted as is already done:

addBackendConnection(newConnection);

After this small fix you can spam queries to your heart's content with no issues :)

…e 'ready'

New connections are added to the backend connections here:
https://github.com/Ecdar/Ecdar-GUI/blob/9ca653b7817706f132d88c8a773a0487e99c6038/src/main/java/ecdar/backend/BackendDriver.java#L153

But that is before the `updateComponents` query has completed, so a query can take the backend before it is ready. This results in a bunch of non-deterministic errors when executing queries, one being the `UNAVAILABLE: io exception` error.

The backend should only be added on the `onCompleted` as is already done:
https://github.com/Ecdar/Ecdar-GUI/blob/9ca653b7817706f132d88c8a773a0487e99c6038/src/main/java/ecdar/backend/BackendDriver.java#L171

After this small fix you can spam queries to your heart's content with no issues :)

@Nielswps Nielswps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That makes sense

@Nielswps
Nielswps merged commit 6a849df into main Feb 23, 2023
@Nielswps
Nielswps deleted the seblund-patch-1 branch February 23, 2023 07:47
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