File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
bean-manager/src/main/java/com/blobcity/lib/query
engine/src/main/java/com/blobcity/db/master Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -118,12 +118,12 @@ public enum QueryType {
118118 DROP_NODE ("DROP-NODE" ),
119119
120120 // INTERNAL QUERIES
121- ROLLBACK ("ROLLBACK " ),
122- COMMIT ("COMMIT " ), //this is a confirmation to commit the soft commit
123- SOFT_COMMIT_SUCCESS ("SOFT_COMMIT_SUCCESS " ),
124- COMMIT_SUCCESS ("COMMIT_SUCCESS " ),
125- ROLLBACK_SUCCESS ("ROLLBACK_SUCCESS " ),
126- QUERY_RESPONSE ("QUERY_RESPONSE " ), //response for select / read queries
121+ ROLLBACK ("R " ),
122+ COMMIT ("C " ), //this is a confirmation to commit the soft commit
123+ SOFT_COMMIT_SUCCESS ("SCS " ),
124+ COMMIT_SUCCESS ("CS " ),
125+ ROLLBACK_SUCCESS ("RS " ),
126+ QUERY_RESPONSE ("QR " ), //response for select / read queries
127127 PING ("PING" ), //ping on on-going commit to check if thigns are still running
128128 MEM_FLUSH ("MEM-FLUSH" ); //flush a memory table to disk
129129
Original file line number Diff line number Diff line change 3131import java .util .concurrent .TimeUnit ;
3232import java .util .concurrent .TimeoutException ;
3333
34+ import org .apache .mina .util .ConcurrentHashSet ;
3435import org .json .JSONObject ;
3536import org .springframework .context .ApplicationContext ;
3637
4243 */
4344public abstract class AbstractCommitMaster implements MasterExecutable {
4445
46+ public static final Set <String > activeQueries = new ConcurrentHashSet <>();
47+
4548 protected final Query query ;
4649 protected final ApplicationContext applicationContext ;
4750 protected final Semaphore semaphore = new Semaphore (0 );
@@ -74,7 +77,7 @@ protected ClusterMessaging clusterMessagingBeanInstance() {
7477
7578 protected void awaitCompletion () {
7679 try {
77- semaphore .tryAcquire (60 , TimeUnit .SECONDS ); //waits 60 seconds
80+ semaphore .tryAcquire ( 60 , TimeUnit .SECONDS ); //waits 60 seconds
7881 semaphore .release (); // release the immediately last acquire, as the semaphore is no longer required
7982 } catch (InterruptedException e ) {
8083 System .out .println ("Insert timed out" );
You can’t perform that action at this time.
0 commit comments