reverbrain / elliptics

Distributed storage for medium and large objects with streaming support
http://reverbrain.com/elliptics
GNU Lesser General Public License v3.0
497 stars 85 forks source link

Server send timeouts extension #703

Closed bioothod closed 8 years ago

bioothod commented 8 years ago

Currently neither copy/move iterator nor server-send operation allow setting write command timeout, which is vital for long-distance connections and slow links between groups. This pull request allows to set this parameter from command line options already present in all clients (python and C++ bindings).

This pull request breaks backward compatibility for server-send command, but since our internal tools are the only users of this feature, it should be ok.

shaitan commented 8 years ago

Build has been failed on server-send tests:

[16:09:19][Step 1/3] Set base directory: "/tmp/buildd/elliptics-2.26.10.3/obj-x86_64-linux-gnu/tests/result/dnet_server_send_test"
[16:09:19][Step 1/3] Set cocaine run directory: "/tmp/elliptics-test-run-384e9457/"
[16:09:19][Step 1/3] Starting 3 servers
[16:09:19][Step 1/3] Starting server #1
[16:09:19][Step 1/3] Started server #1
[16:09:19][Step 1/3] Starting server #2
[16:09:19][Step 1/3] Started server #2
[16:09:19][Step 1/3] Starting server #3
[16:09:19][Step 1/3] Started server #3
[16:09:20][Step 1/3] Started servers
[16:12:59][Step 1/3] Running 24 test cases...
[16:12:59][Step 1/3] /tmp/buildd/elliptics-2.26.10.3/tests/server_send.cpp(253): fatal error in "(ssend_test_server_send, src_noexception, 1, id_prefix, data_prefix, delayed_groups, iflags, -110)": critical check it->reply()->status == status failed [0 != -110]
[16:12:59][Step 1/3] 
[16:12:59][Step 1/3] *** 1 failure detected in test suite "Master Test Suite"
bioothod commented 8 years ago

It is not related to this pull request, since by default it doesn't change any timeout, but uses what was set in the node or session.

shaitan commented 8 years ago

Current master has been built without such error:

[16:50:55][Step 1/3] Set base directory: "/tmp/buildd/elliptics-2.26.10.3/obj-x86_64-linux-gnu/tests/result/dnet_server_send_test"
[16:50:55][Step 1/3] Set cocaine run directory: "/tmp/elliptics-test-run-6d07589e/"
[16:50:55][Step 1/3] Starting 3 servers
[16:50:55][Step 1/3] Starting server #1
[16:50:55][Step 1/3] Started server #1
[16:50:55][Step 1/3] Starting server #2
[16:50:55][Step 1/3] Started server #2
[16:50:55][Step 1/3] Starting server #3
[16:50:55][Step 1/3] Started server #3
[16:50:57][Step 1/3] Started servers
[16:54:35][Step 1/3] Running 24 test cases...
[16:54:35][Step 1/3] 
[16:54:35][Step 1/3] *** No errors detected
shaitan commented 8 years ago

I've rebuilt 3 times master with these changes merged and it always failed server-send test.

bioothod commented 8 years ago

Yup, my fault, long test waits for default 60 seconds, while session used in the test has 120 seconds timeout which is now propagated into the iterator and server_send call. I've updated test with the new commit.

shaitan commented 8 years ago

Looks good, thank you!