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

WaitOne on ManualResetEvents can cause the shutdown to hang indefinitely #980

Closed
danielmarbach opened this Issue Jun 22, 2017 · 2 comments

Comments

Projects
None yet
4 participants
@danielmarbach
Copy link
Member

danielmarbach commented Jun 22, 2017

Who's affected

Customers having a large number of audit messages to clean up

Symptoms

Audit message cleaning can take a really long time and is currently not implemented with cancellation tokens to indicate to the chunker and cleaner that SC wants to shut down. In combination with the ManualResetEvent usage for example in ExpiredDocumentsCleanerBundle it can lead to issues where the shutdown takes hours or never occurs.

This also affects the setup phase of ServiceControl. RavenDB Embeddable Document Store will automatically load the expired documents cleaner bundle and execute it even during the setup phase. In this case, it is possible that the setup phase hangs indefinitely.

image

Things to consider

  • Use ManualResetEvents with timeout on the wait operation
  • Make document expiration cancellable
  • Figure out how to disable the expiration bundle when SC is executed in context of the management util.

@danielmarbach danielmarbach added the Bug label Jun 22, 2017

@SzymonPobiega

This comment has been minimized.

Copy link
Member

SzymonPobiega commented Jun 22, 2017

@danielmarbach I'd suggest adding another item to the PoA: figure out how to disable the expiration bundle when SC is executed in context of the management util.

@danielmarbach

This comment has been minimized.

Copy link
Member

danielmarbach commented Jun 22, 2017

@SzymonPobiega updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment