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

Add timeout on zkDataCache dependent task #362

Merged
merged 2 commits into from
Apr 19, 2017
Merged

Conversation

rdhabalia
Copy link
Contributor

Motivation

Add timeout on blocking call which waits on future returned by ZkCache. Due to unknown reason if ZkCache couldn't complete the returned future then it blocks threads forever. So, timeout will interrupt blocked threads and logs the warning of this behavior.

Modifications

Add timeout on blocking call which waits on future returned by ZkCache.

Result

Timeout will interrupt blocked threads and logs the warning of this behavior.

@rdhabalia rdhabalia added the type/bug The PR fixed a bug or issue reported a bug label Apr 17, 2017
@rdhabalia rdhabalia added this to the 1.18 milestone Apr 17, 2017
@rdhabalia rdhabalia self-assigned this Apr 17, 2017
Copy link
Contributor

@merlimat merlimat left a comment

Choose a reason for hiding this comment

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

👍

@@ -74,6 +74,7 @@
protected final Cache<String, Set<String>> childrenCache;
protected final Cache<String, Boolean> existsCache;
protected final OrderedSafeExecutor executor;
public static final int cacheTimeOutInSec = 120;
Copy link
Contributor

Choose a reason for hiding this comment

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

We could keep it a bit lower than that. What about 30sec?

Copy link
Contributor

Choose a reason for hiding this comment

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

30sec?

Copy link
Contributor

Choose a reason for hiding this comment

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

ZK read operation should complete fairly quickly. If anyway we timeout early, it would just mean permission denied for one particular request but it will be able to catch up later.

@merlimat merlimat merged commit 0992011 into apache:master Apr 19, 2017
@rdhabalia rdhabalia deleted the zk_ex branch June 21, 2017 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug The PR fixed a bug or issue reported a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants