[NO ISSUE][TX]: Multiple fixes to atomic statements

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Correctly computes partition count in case of parallel
  execution.
- Correctly computes node count in case of a node group
  is used.
- Fix for the case when a job prepared message is recieved
  after the transaction is aborted.
- Job commit message is sent in commitTransaction method.
  This makes sure that the commit messages are sent only
  after the job was successfull.
- Fix for the case when job is aborted/cancelled after
  flushes are scheduled on atomic datasets but are not
  finished.

Change-Id: Ieb029d6273f19fa4bd0e7edfb8897f894c1f5b6e
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/17643
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <mhubail@apache.org>
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index d1a59a3..d24873e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -4145,24 +4145,24 @@
         -->
   </test-group>
   <test-group name="ddl">
-<!--    <test-case FilePath="ddl">-->
-<!--      <compilation-unit name="create-dataset-1">-->
-<!--        <output-dir compare="Clean-JSON">create-dataset-1</output-dir>-->
-<!--      </compilation-unit>-->
-<!--    </test-case>-->
-<!--    <test-case FilePath="ddl">-->
-<!--      <compilation-unit name="create-dataset-2">-->
-<!--        <output-dir compare="Clean-JSON">create-dataset-2</output-dir>-->
-<!--        <source-location>false</source-location>-->
-<!--        <expected-error>type mismatch: missing a required closed field my_id: string</expected-error>-->
-<!--      </compilation-unit>-->
-<!--    </test-case>-->
-<!--    <test-case FilePath="ddl">-->
-<!--      <compilation-unit name="create-dataset-3">-->
-<!--        <output-dir compare="Clean-JSON">create-dataset-3</output-dir>-->
-<!--        <expected-error>ASX1077: Cannot find dataset non_existent in dataverse test nor an alias with name non_existent (in line 23, at column 21)</expected-error>-->
-<!--      </compilation-unit>-->
-<!--    </test-case>-->
+    <test-case FilePath="ddl">
+      <compilation-unit name="create-dataset-1">
+        <output-dir compare="Clean-JSON">create-dataset-1</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="ddl">
+      <compilation-unit name="create-dataset-2">
+        <output-dir compare="Clean-JSON">create-dataset-2</output-dir>
+        <source-location>false</source-location>
+        <expected-error>type mismatch: missing a required closed field my_id: string</expected-error>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="ddl">
+      <compilation-unit name="create-dataset-3">
+        <output-dir compare="Clean-JSON">create-dataset-3</output-dir>
+        <expected-error>ASX1077: Cannot find dataset non_existent in dataverse test nor an alias with name non_existent (in line 23, at column 21)</expected-error>
+      </compilation-unit>
+    </test-case>
     <test-case FilePath="ddl">
       <compilation-unit name="analyze-dataset-1">
         <output-dir compare="Text">analyze-dataset-1</output-dir>
@@ -16321,25 +16321,35 @@
       </compilation-unit>
     </test-case>
   </test-group>
-<!--  <test-group name="copy">-->
-<!--    <test-case FilePath="copy">-->
-<!--      <compilation-unit name="copy-1">-->
-<!--        <output-dir compare="Text">copy-1</output-dir>-->
-<!--      </compilation-unit>-->
-<!--    </test-case>-->
-<!--  </test-group>-->
-<!--  <test-group name="atomic-statements">-->
-<!--    <test-case FilePath="atomic-statements">-->
-<!--      <compilation-unit name="atomic-statements-1">-->
-<!--        <output-dir compare="Clean-JSON">atomic-statements-1</output-dir>-->
-<!--        <expected-error>HYR0033: Inserting duplicate keys into the primary storage</expected-error>-->
-<!--        <source-location>false</source-location>-->
-<!--      </compilation-unit>-->
-<!--    </test-case>-->
-<!--    <test-case FilePath="atomic-statements">-->
-<!--      <compilation-unit name="atomic-statements-2">-->
-<!--        <output-dir compare="Clean-JSON">atomic-statements-2</output-dir>-->
-<!--      </compilation-unit>-->
-<!--    </test-case>-->
-<!--  </test-group>-->
+  <test-group name="copy">
+    <test-case FilePath="copy">
+      <compilation-unit name="copy-1">
+        <output-dir compare="Text">copy-1</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
+  <test-group name="atomic-statements">
+    <test-case FilePath="atomic-statements">
+      <compilation-unit name="atomic-statements-1">
+        <output-dir compare="Clean-JSON">atomic-statements-1</output-dir>
+        <expected-error>HYR0033: Inserting duplicate keys into the primary storage</expected-error>
+        <source-location>false</source-location>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="atomic-statements">
+      <compilation-unit name="atomic-statements-2">
+        <output-dir compare="Clean-JSON">atomic-statements-2</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="atomic-statements">
+      <compilation-unit name="atomic-statements-3">
+        <output-dir compare="Clean-JSON">atomic-statements-3</output-dir>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="atomic-statements">
+      <compilation-unit name="atomic-statements-4">
+        <output-dir compare="Clean-JSON">atomic-statements-4</output-dir>
+      </compilation-unit>
+    </test-case>
+  </test-group>
 </test-suite>