Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ObjStore empty list fix #572

Closed

Conversation

Ivandemidov00
Copy link
Contributor

Resolves #563

Copy link
Collaborator

@mtmk mtmk left a comment

Choose a reason for hiding this comment

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

Looking good 💯 just a quick question below.

await _commandTask;

_msgChannel.Writer.TryComplete();

Copy link
Collaborator

Choose a reason for hiding this comment

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

why did we change these? did you encounter an issue? (you're probably right to make these changes, I just can't remember my reasoning here so just curious)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I encountered some problem.
Before exiting WatchAsync, if Enumerable is empty, call pushConsumer.Init();
The consumer is initialized and the same consumer is immediately deleted in the dispose method.
The creation operation _consumerCreateTask has not yet had time to complete and it requires an active _commandChannel, but it is already closed. Based on this, I decided to change the order of stopping channel reading.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Otherwise, when Dispose we get NatsJSApiException: consumer not found.

Copy link
Collaborator

Choose a reason for hiding this comment

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

awesome, thanks fixing that 💯 should we stick this as comment on top of the relevant lines do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea! Added.

Copy link
Collaborator

@mtmk mtmk left a comment

Choose a reason for hiding this comment

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

LGTM thanks @Ivandemidov00

ps @Ivandemidov00 are you on slack.nats.io dotnet channel?

@mtmk
Copy link
Collaborator

mtmk commented Jul 23, 2024

ouch sorry @Ivandemidov00 I keep forgetting this finally we put a check in github. could you please sign your commits? cheers
image

edit it's a CNCF requirement apparently. thanks again!

@Ivandemidov00
Copy link
Contributor Author

I signed the commits and moved them to the next branch #578.
I think we can close this request

@mtmk mtmk closed this Jul 24, 2024
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.

NatsObjStore.ListAsync hangs if bucket is empty
2 participants