http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.5.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.5.ddl.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.5.ddl.aql
new file mode 100644
index 0000000..bd9bace
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.5.ddl.aql
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use dataverse recovery;
+
+/* Create keyword secondary index on dataset clean Fragile */
+create index cfText on Fragile(text) type keyword;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.6.txnqbc.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.6.txnqbc.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.6.txnqbc.aql
new file mode 100644
index 0000000..2b0eb36
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.6.txnqbc.aql
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use dataverse recovery;
+
+for $x in dataset Fragile
+where word-tokens($x.text) ~= word-tokens(" 1 20130417 1")
+return $x.text;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.7.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.7.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.7.script.aql
new file mode 100644
index 0000000..4583455
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.7.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+kill_cc_and_nc.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.8.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.8.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.8.script.aql
new file mode 100644
index 0000000..7087cd3
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.8.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+stop_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.9.txnqar.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.9.txnqar.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.9.txnqar.aql
new file mode 100644
index 0000000..2b0eb36
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_correlated_secondary_index/primary_plus_keyword_correlated_secondary_index.9.txnqar.aql
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use dataverse recovery;
+
+for $x in dataset Fragile
+where word-tokens($x.text) ~= word-tokens(" 1 20130417 1")
+return $x.text;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.1.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.1.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.1.script.aql
new file mode 100644
index 0000000..7d441cd
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.1.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+create_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.2.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.2.ddl.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.2.ddl.aql
new file mode 100644
index 0000000..db307e0
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.2.ddl.aql
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/* 
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and 
crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+drop dataverse recovery if exists;
+create dataverse recovery;
+use dataverse recovery;
+
+/* For raw Fragile data */
+create type FragileTypeRaw as closed {
+  row_id: int32,
+  sid: int32,
+  date: string,
+  day: int32,
+  time: string,
+  bpm: int32,
+  RR: float,
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+  
+};
+
+/* For cleaned Fragile data */
+create type FragileType as closed {
+  row_id: int32,
+  sid: int32,
+  date: date,
+  day: int32,
+  time: time,
+  bpm: int32,
+  RR: float,
+  
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+};
+
+/* Create dataset for loading raw Fragile data */
+create dataset Fragile_raw (FragileTypeRaw)
+primary key row_id;
+
+/* Create dataset for cleaned Fragile data */
+create dataset Fragile (FragileType)
+primary key row_id;
+
+/* Create keyword secondary index on dataset clean Fragile */
+create index cfText on Fragile(text) type keyword;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.3.update.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.3.update.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.3.update.aql
new file mode 100644
index 0000000..e286a80
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.3.update.aql
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Test case Name  : primary_plus_default_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and 
crash recovery works after the abort.
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+load dataset Fragile_raw using localfs
+(("path"="asterix_nc1://../../../../../asterix-app/data/csv/fragile_02.adm"),("format"="adm"))
 pre-sorted;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.4.txneu.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.4.txneu.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.4.txneu.aql
new file mode 100644
index 0000000..7c1c623
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.4.txneu.aql
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/* 
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and 
crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+/* Load Fragile data from raw dataset into cleaned dataset */
+insert into dataset Fragile (
+  for $t in dataset Fragile_raw
+  return {
+    "row_id": $t.row_id % 28000,
+    "sid": $t.sid,
+    "date": date($t.date),
+    "day": $t.day,
+    "time": parse-time($t.time, "h:m:s"),
+    "bpm": $t.bpm,
+    "RR": $t.RR,
+    "text": $t.text,
+    "location": $t.location,
+    "text2": $t.text2
+  }
+);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.5.txnqbc.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.5.txnqbc.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.5.txnqbc.aql
new file mode 100644
index 0000000..4d48e81
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.5.txnqbc.aql
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use dataverse recovery;
+
+for $x in dataset Fragile 
+where word-tokens($x.text) ~= word-tokens(" 1 20130417 1")
+return $x.text;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.6.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.6.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.6.script.aql
new file mode 100644
index 0000000..4583455
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.6.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+kill_cc_and_nc.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.7.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.7.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.7.script.aql
new file mode 100644
index 0000000..7087cd3
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.7.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+stop_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.8.txnqar.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.8.txnqar.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.8.txnqar.aql
new file mode 100644
index 0000000..4d48e81
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.8.txnqar.aql
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use dataverse recovery;
+
+for $x in dataset Fragile 
+where word-tokens($x.text) ~= word-tokens(" 1 20130417 1")
+return $x.text;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.9.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.9.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.9.script.aql
new file mode 100644
index 0000000..40df6fb
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index/primary_plus_keyword_secondary_index.9.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+stop_and_delete.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.1.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.1.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.1.script.aql
new file mode 100644
index 0000000..db1a058
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.1.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+create_and_start.sh

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.2.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.2.ddl.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.2.ddl.aql
new file mode 100644
index 0000000..6c05844
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.2.ddl.aql
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and 
crash recovery works after the abort.
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+drop dataverse recovery if exists;
+create dataverse recovery;
+use dataverse recovery;
+
+/* For raw Fragile data */
+create type FragileTypeRaw as closed {
+  row_id: int32,
+  sid: int32,
+  date: string,
+  day: int32,
+  time: string,
+  bpm: int32,
+  RR: float,
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+};
+
+/* For cleaned Fragile data */
+create type FragileType as closed {
+  row_id: int32,
+  sid: int32,
+  date: date,
+  day: int32,
+  time: time,
+  bpm: int32,
+  RR: float,
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+};
+
+/* Create dataset for loading raw Fragile data */
+create dataset Fragile_raw (FragileTypeRaw)
+primary key row_id;
+
+/* Create dataset for cleaned Fragile data */
+create dataset Fragile (FragileType)
+primary key row_id with filter on date;
+
+/* Create keyword secondary index on dataset clean Fragile */
+create index cfText on Fragile(text) type keyword;
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.3.update.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.3.update.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.3.update.aql
new file mode 100644
index 0000000..d52fe3e
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.3.update.aql
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and 
crash recovery works after the abort.
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+
+load dataset Fragile_raw using localfs
+(("path"="asterix_nc1://../../../../../asterix-app/data/csv/fragile_02.adm"),("format"="adm"))
 pre-sorted;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.4.txneu.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.4.txneu.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.4.txneu.aql
new file mode 100644
index 0000000..bd5e659
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.4.txneu.aql
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and 
crash recovery works after the abort.
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+/* Load Fragile data from raw dataset into cleaned dataset */
+insert into dataset Fragile (
+  for $t in dataset Fragile_raw
+  return {
+    "row_id": $t.row_id % 28000,
+    "sid": $t.sid,
+    "date": date($t.date),
+    "day": $t.day,
+    "time": parse-time($t.time, "h:m:s"),
+    "bpm": $t.bpm,
+    "RR": $t.RR,
+    "text": $t.text,
+    "location": $t.location,
+    "text2": $t.text2
+  }
+);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.5.txnqbc.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.5.txnqbc.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.5.txnqbc.aql
new file mode 100644
index 0000000..2b0eb36
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.5.txnqbc.aql
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use dataverse recovery;
+
+for $x in dataset Fragile
+where word-tokens($x.text) ~= word-tokens(" 1 20130417 1")
+return $x.text;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.6.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.6.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.6.script.aql
new file mode 100644
index 0000000..9513534
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.6.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+kill_cc_and_nc.sh

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.7.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.7.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.7.script.aql
new file mode 100644
index 0000000..d844d13
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.7.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+stop_and_start.sh

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.8.txnqar.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.8.txnqar.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.8.txnqar.aql
new file mode 100644
index 0000000..2b0eb36
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.8.txnqar.aql
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use dataverse recovery;
+
+for $x in dataset Fragile
+where word-tokens($x.text) ~= word-tokens(" 1 20130417 1")
+return $x.text;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.9.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.9.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.9.script.aql
new file mode 100644
index 0000000..f43dec7
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_keyword_secondary_index_filtered/primary_plus_keyword_secondary_index_filtered.9.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+stop_and_delete.sh

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.1.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.1.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.1.script.aql
new file mode 100644
index 0000000..7d441cd
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.1.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+create_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.10.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.10.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.10.script.aql
new file mode 100644
index 0000000..40df6fb
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.10.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+stop_and_delete.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.2.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.2.ddl.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.2.ddl.aql
new file mode 100644
index 0000000..e473591
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.2.ddl.aql
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/*
+ * Test case Name  : primary_plus_multiple_correlated_secondary_indices.aql
+ * Description     : Check that abort from duplicate key exception works and 
crash recovery works after the abort.
+ * Expected Result : Success
+ * Date            : June 21 2017
+ */
+
+drop dataverse recovery if exists;
+create dataverse recovery;
+use dataverse recovery;
+
+/* For raw Fragile data */
+create type FragileTypeRaw as closed {
+  row_id: int32,
+  sid: int32,
+  date: string,
+  day: int32,
+  time: string,
+  bpm: int32,
+  RR: float,
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+
+};
+
+/* For cleaned Fragile data */
+create type FragileType as closed {
+  row_id: int32,
+  sid: int32,
+  date: date,
+  day: int32,
+  time: time,
+  bpm: int32,
+  RR: float,
+
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+};
+
+/* Create dataset for loading raw Fragile data */
+create dataset Fragile_raw (FragileTypeRaw)
+primary key row_id
+with {
+  "merge-policy": {
+    "name": "correlated-prefix",
+    "parameters": { "max-mergable-component-size": 16384, 
"max-tolerance-component-count": 3 }
+  }
+};
+
+/* Create dataset for cleaned Fragile data */
+create dataset Fragile (FragileType)
+primary key row_id
+with {
+  "merge-policy": {
+    "name": "correlated-prefix",
+    "parameters": { "max-mergable-component-size": 16384, 
"max-tolerance-component-count": 3 }
+  }
+};
+

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.3.update.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.3.update.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.3.update.aql
new file mode 100644
index 0000000..9b0e47d
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.3.update.aql
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use dataverse recovery;
+
+
+load dataset Fragile_raw using localfs
+(("path"="asterix_nc1://../../../../../asterix-app/data/csv/fragile_02.adm"),("format"="adm"))
 pre-sorted;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.4.txneu.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.4.txneu.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.4.txneu.aql
new file mode 100644
index 0000000..1ebb2ef
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.4.txneu.aql
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use dataverse recovery;
+
+/* Load Fragile data from raw dataset into cleaned dataset */
+insert into dataset Fragile (
+  for $t in dataset Fragile_raw
+  return {
+    "row_id": $t.row_id % 28000,
+    "sid": $t.sid,
+    "date": date($t.date),
+    "day": $t.day,
+    "time": parse-time($t.time, "h:m:s"),
+    "bpm": $t.bpm,
+    "RR": $t.RR,
+    "text": $t.text,
+    "location": $t.location,
+    "text2": $t.text2
+  }
+);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.5.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.5.ddl.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.5.ddl.aql
new file mode 100644
index 0000000..3a35fd4
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.5.ddl.aql
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use dataverse recovery;
+
+create index cfLocation on Fragile(location) type rtree;
+
+create index cfText on Fragile(text) type keyword;
+
+create index cfSidIdx on Fragile(sid);
+
+create index cfText2Ix on Fragile(text2) type ngram(3);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.6.txnqbc.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.6.txnqbc.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.6.txnqbc.aql
new file mode 100644
index 0000000..3c30ea8
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.6.txnqbc.aql
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use dataverse recovery;
+
+count (for $x in dataset Fragile
+where contains($x.text2, "location") return $x);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.7.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.7.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.7.script.aql
new file mode 100644
index 0000000..4583455
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.7.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+kill_cc_and_nc.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.8.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.8.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.8.script.aql
new file mode 100644
index 0000000..7087cd3
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.8.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+stop_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.9.txnqar.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.9.txnqar.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.9.txnqar.aql
new file mode 100644
index 0000000..3c30ea8
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_correlated_secondary_indices/primary_plus_multiple_correlated_secondary_indices.9.txnqar.aql
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use dataverse recovery;
+
+count (for $x in dataset Fragile
+where contains($x.text2, "location") return $x);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.1.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.1.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.1.script.aql
new file mode 100644
index 0000000..7d441cd
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.1.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+create_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.2.ddl.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.2.ddl.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.2.ddl.aql
new file mode 100644
index 0000000..c608ab4
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.2.ddl.aql
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/* 
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and 
crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+drop dataverse recovery if exists;
+create dataverse recovery;
+use dataverse recovery;
+
+/* For raw Fragile data */
+create type FragileTypeRaw as closed {
+  row_id: int32,
+  sid: int32,
+  date: string,
+  day: int32,
+  time: string,
+  bpm: int32,
+  RR: float,
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+  
+};
+
+/* For cleaned Fragile data */
+create type FragileType as closed {
+  row_id: int32,
+  sid: int32,
+  date: date,
+  day: int32,
+  time: time,
+  bpm: int32,
+  RR: float,
+  
+  /* new string field and location field*/
+  text: string,
+  location: point,
+  text2: string
+};
+
+/* Create dataset for loading raw Fragile data */
+create dataset Fragile_raw (FragileTypeRaw)
+primary key row_id;
+
+/* Create dataset for cleaned Fragile data */
+create dataset Fragile (FragileType)
+primary key row_id;
+
+
+/* Create rtree secondary index on dataset clean Fragile */
+create index cfLocation on Fragile(location) type rtree;
+
+create index cfText on Fragile(text) type keyword;
+
+create index cfSidIdx on Fragile(sid);
+
+create index cfText2Ix on Fragile(text2) type ngram(3);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.3.update.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.3.update.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.3.update.aql
new file mode 100644
index 0000000..cc626b5
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.3.update.aql
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/* 
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and 
crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+
+load dataset Fragile_raw using localfs
+(("path"="asterix_nc1://../../../../../asterix-app/data/csv/fragile_02.adm"),("format"="adm"))
 pre-sorted;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.4.txneu.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.4.txneu.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.4.txneu.aql
new file mode 100644
index 0000000..7c1c623
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.4.txneu.aql
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/* 
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and 
crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Oct 15 2013
+ */
+
+use dataverse recovery;
+
+/* Load Fragile data from raw dataset into cleaned dataset */
+insert into dataset Fragile (
+  for $t in dataset Fragile_raw
+  return {
+    "row_id": $t.row_id % 28000,
+    "sid": $t.sid,
+    "date": date($t.date),
+    "day": $t.day,
+    "time": parse-time($t.time, "h:m:s"),
+    "bpm": $t.bpm,
+    "RR": $t.RR,
+    "text": $t.text,
+    "location": $t.location,
+    "text2": $t.text2
+  }
+);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.5.txnqbc.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.5.txnqbc.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.5.txnqbc.aql
new file mode 100644
index 0000000..ca06f14
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.5.txnqbc.aql
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+/* 
+ * Test case Name  : primary_plus_keyword_secondary_index.aql
+ * Description     : Check that abort from duplicate key exception works and 
crash recovery works after the abort.   
+ * Expected Result : Success
+ * Date            : Otc 15 2013
+ */
+
+
+use dataverse recovery;
+
+count (for $x in dataset Fragile 
+where contains($x.text2, "location") return $x);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.6.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.6.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.6.script.aql
new file mode 100644
index 0000000..4583455
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.6.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+kill_cc_and_nc.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.7.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.7.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.7.script.aql
new file mode 100644
index 0000000..7087cd3
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.7.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+stop_and_start.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.8.txnqar.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.8.txnqar.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.8.txnqar.aql
new file mode 100644
index 0000000..4738d05
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.8.txnqar.aql
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+use dataverse recovery;
+
+count (for $x in dataset Fragile 
+where contains($x.text2, "location") return $x);

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.9.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.9.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.9.script.aql
new file mode 100644
index 0000000..40df6fb
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices/primary_plus_multiple_secondary_indices.9.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+stop_and_delete.sh
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/5dcf139e/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices_filtered/primary_plus_multiple_secondary_indices_filtered.1.script.aql
----------------------------------------------------------------------
diff --git 
a/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices_filtered/primary_plus_multiple_secondary_indices_filtered.1.script.aql
 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices_filtered/primary_plus_multiple_secondary_indices_filtered.1.script.aql
new file mode 100644
index 0000000..db1a058
--- /dev/null
+++ 
b/asterixdb/asterix-server/src/test/resources/transactionts/queries/recover_after_abort/primary_plus_multiple_secondary_indices_filtered/primary_plus_multiple_secondary_indices_filtered.1.script.aql
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+create_and_start.sh

Reply via email to