Skip to content

WIP: Fetch list of nodes in a cluster client #129

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

Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
b424720
refactor
pda4code Feb 4, 2019
e5d2015
Method refreshServerList "created"
Feb 5, 2019
397c090
Create a TarantoolNode that describes a node
Feb 8, 2019
653d4de
Implementing ClusterTopologyDiscoverer.java & co
pda4code Feb 10, 2019
3bde207
Add test benchmark
pda4code Feb 11, 2019
c38304b
Implement non-working tarantool client impl read-write measurment
Feb 12, 2019
c0839e8
Attempt to refactor
Feb 13, 2019
bd9276b
Yet another attempt to force the benchmark to work
Feb 14, 2019
de2e9ef
Yet another refactor iteration
pda4code Feb 17, 2019
848fcf2
Refactor reading from channel
pda4code Feb 24, 2019
2239322
AbstractTarantoolConnectorIT restore RESTART_TIMEOUT value
pda4code Feb 24, 2019
10854fc
SelectorChannelReadHelper fix + add some todo
pda4code Feb 24, 2019
2b02862
Move connection logic to channel provider. Part1
Feb 25, 2019
4918ba4
Works onRoundRobinSocketChannelProvider; Some refactors
pda4code Feb 25, 2019
a8dde82
Try replace socket provider with NodeCommunicationProvider.
Feb 26, 2019
20b2eb0
Make connector compilable
pda4code Feb 26, 2019
7379be8
Implementing TarantoolClusterClient#refreshServerList method
Feb 27, 2019
9bf51b7
Make connector compilable
pda4code Feb 28, 2019
8ddadda
Try to resolve race-conditions at readFromInstance and refreshServerList
pda4code Mar 4, 2019
4aa0852
Upgrade refreshServerList method: stop IO before process old connection
Mar 4, 2019
57cbc7c
IMplement cleaning futuresSentToOldConnection collection
pda4code Mar 5, 2019
3a32574
Pass Async/Sync tarantool client test. Cleanup code from todos and
pda4code Mar 6, 2019
7d7bafd
Write a test for cluster topology discoverer. Fix the discoverer inte…
pda4code Mar 10, 2019
6e98d22
Rename: SingleNodeCommunicationProvider -> SingleNodeConnectionProvider
pda4code Mar 10, 2019
bb69dd8
Rename: NodeCommunicationProvider -> InstanceConnectionProvider
pda4code Mar 10, 2019
65db6ab
Rename: TestNodeConnectionProvider -> TestInstanceConnectionProvider;…
pda4code Mar 10, 2019
db8e2e2
jdbc: remove the outdated tarantool sql types
nicktorwald Mar 11, 2019
2520b59
fix broken tests
nicktorwald Mar 13, 2019
df19295
Move readPacket method into TarantoolInstanceConnection
pda4code Mar 14, 2019
85b8994
add a todo
pda4code Mar 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Make connector compilable
  • Loading branch information
pda4code committed Feb 28, 2019
commit 9bf51b74e3657a313bce35f5dd599f4cf77fccc7
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.tarantool;

import org.tarantool.server.TarantoolInstanceConnection;

import java.io.IOException;

public class TestNodeCommunicationProvider extends SingleNodeCommunicationProvider {
Expand All @@ -12,13 +14,12 @@ public TestNodeCommunicationProvider(String address, String username, String pas
}

@Override
public void connect() throws IOException {
public TarantoolInstanceConnection connect() throws IOException {

long budget = System.currentTimeMillis() + restartTimeout;
while (!Thread.currentThread().isInterrupted()) {
try {
super.connect();
return;
return super.connect();
} catch (Exception e) {
if (budget < System.currentTimeMillis())
throw new RuntimeException(e);
Expand Down
5 changes: 3 additions & 2 deletions src/test/perf/org/tarantool/MyBenchmark.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.openjdk.jmh.annotations.*;
import org.tarantool.server.TarantoolBinaryPackage;
import org.tarantool.server.TarantoolInstanceConnection;

import java.io.IOException;
import java.nio.ByteBuffer;
Expand Down Expand Up @@ -30,8 +31,8 @@ public SocketChannel get() {
*/
private static class DodgeCommunication implements NodeCommunicationProvider {
@Override
public void connect() throws IOException {

public TarantoolInstanceConnection connect() throws IOException {
return null;
}

@Override
Expand Down