Repository: cloudstack Updated Branches: refs/heads/4.9-bountycastle-daan 722156da1 -> 8a031271c (forced update)
CLOUDSTACK-9348: Reduce Nio selector wait time This reduced the Nio loop selector wait time, this way the selector will check frequently (as much as 100ms per iteration) and handle any pending connection/tasks. This would make reconnections very quick at the expense of some CPU usage. Signed-off-by: Rohit Yadav <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0381b7ea Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0381b7ea Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0381b7ea Branch: refs/heads/4.9-bountycastle-daan Commit: 0381b7ea185ef753873594216a67b8d376e3d658 Parents: e4ba640 Author: Rohit Yadav <[email protected]> Authored: Fri Jul 1 14:32:58 2016 +0530 Committer: Rohit Yadav <[email protected]> Committed: Fri Jul 1 14:34:48 2016 +0530 ---------------------------------------------------------------------- utils/src/main/java/com/cloud/utils/nio/NioConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0381b7ea/utils/src/main/java/com/cloud/utils/nio/NioConnection.java ---------------------------------------------------------------------- diff --git a/utils/src/main/java/com/cloud/utils/nio/NioConnection.java b/utils/src/main/java/com/cloud/utils/nio/NioConnection.java index 9d755d6..630b2dd 100644 --- a/utils/src/main/java/com/cloud/utils/nio/NioConnection.java +++ b/utils/src/main/java/com/cloud/utils/nio/NioConnection.java @@ -125,7 +125,7 @@ public abstract class NioConnection implements Callable<Boolean> { public Boolean call() throws NioConnectionException { while (_isRunning) { try { - _selector.select(1000); + _selector.select(100); // Someone is ready for I/O, get the ready keys final Set<SelectionKey> readyKeys = _selector.selectedKeys();
