Permalink
Browse files

final v

  • Loading branch information...
Ge Gao
Ge Gao committed Dec 3, 2013
1 parent 6d7a274 commit 150756abba7bd0cb47ce45dc2dbe1ed656c45c61
@@ -42,7 +42,7 @@ neworder_only = false
# Whether to allow NewOrder txns to touch multiple partitions
# You can control the percentage of these txns with neworder_multip_mix
neworder_multip = true
neworder_multip = false
# The percentage of NewOrder txns that touch multiple partitions.
# Setting it to -1 will use the default configuration
@@ -64,7 +64,7 @@ neworder_skew_warehouse = false
payment_only = false
# Whether to allow Payment txns to touch multiple partitions.
payment_multip = true
payment_multip = false
# The percentage of Payment txns that touch multiple partitions.
# Setting it to -1 will use the default configuration
@@ -152,6 +152,11 @@ private void runSnapshot() {
if (len == 0) { // Shutdown request
if (debug.val)
LOG.debug("Get shutdown message from parent");
try {
kkSocket.close();
} catch (IOException e) {
e.printStackTrace();
}
System.exit(0);
break;
}
@@ -223,13 +228,14 @@ public void stopSnapshot() {
in.readInt();
} catch (IOException e) {
}
ProcessUtils.kill(snapshot_pid);
if (debug.val)
LOG.debug("Shut down successfully");
try {
/*try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
}*/
this.snapshot_pid = 0;
this.out = null;
this.in = null;
@@ -264,12 +270,26 @@ public void run() {
hstore_site.responseError(ts.getClientHandle(), Status.ABORT_CONNECTION_LOST, "Forking Snapshot fails", ts.getClientCallback(), ts.getInitiateTime());
return;
}
refresh = false;
try {
refresh = false;
clientSocket = serverSocket.accept();
out = new DataOutputStream(clientSocket.getOutputStream());
in = new DataInputStream(clientSocket.getInputStream());
} catch (IOException e) {
LOG.error("", e);
this.hstore_site.responseError(
ts.getClientHandle(),
Status.ABORT_CONNECTION_LOST,
"Fail to execute on snapshot",
ts.getClientCallback(),
ts.getInitiateTime());
if (snapshot_pid != 0) {
ProcessUtils.kill(snapshot_pid);
snapshot_pid = 0;
}
}
}
try {
clientSocket = serverSocket.accept();
out = new DataOutputStream(clientSocket.getOutputStream());
in = new DataInputStream(clientSocket.getInputStream());
// write request
ByteString bs = ByteString.EMPTY;
bs = ByteString.copyFrom(FastSerializer.serialize(ts));

0 comments on commit 150756a

Please sign in to comment.