Skip to content

IGNITE-17685 Sql. SQL engine should send messages asynchronously#1980

Merged
korlov42 merged 5 commits intoapache:mainfrom
gridgain:ignite-17685
Apr 27, 2023
Merged

IGNITE-17685 Sql. SQL engine should send messages asynchronously#1980
korlov42 merged 5 commits intoapache:mainfrom
gridgain:ignite-17685

Conversation

@korlov42
Copy link
Contributor

The patch is split onto two commits. The first one introduces dead code elimination and minor refactoring like moving sending of close message from ExchangeService. The second commit introduce actual refactoring of MessageService

Copy link
Contributor

@zstan zstan left a comment

Choose a reason for hiding this comment

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

looks good, besides minor comments

try {
return messageService.send(targetNodeName, request);
} catch (Throwable th) {
// it's not expected MessageService to throw any exception, yet it may be possible
Copy link
Contributor

Choose a reason for hiding this comment

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

it confusing me, i think we don`t need to write about expectations, as you mention - it`s implementation dependent, additionally for now it throws NODE_LEFT_ERR. I suggest to change this comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

additionally for now it throws NODE_LEFT_ERR

this is not how it expected to be, so thanks to pointing out!

i think we don`t need to write about expectations

Although it's implementation defined, every implementation must conform the contract, which defined by MessageService interface. Currently, method send declares no exception in throws section. Besides, it returns future representing result of operation. Thus, I think it's ok in that particular case to expected of this method not to throw any exception.

Anyway, I reworked the test that make me put this try-catch block (and also fix missed NODE_LEFT_ERR), so we do not need it anymore.

- MessageServiceImpl now is not throwing any exception
- removed confusing try-catch
- removed unused error code
@korlov42 korlov42 merged commit e4a4956 into apache:main Apr 27, 2023
@korlov42 korlov42 deleted the ignite-17685 branch April 27, 2023 06:20
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.

4 participants