You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2016/02/24 17:24:08 UTC
[1/4] incubator-trafodion git commit: TRAFODION-1765 - trafci would
throw an error when set statistics on TRAFODION-1757 - 1) DCS stop script
still not handling zookeeper error properly 2) No indication in DCS logs for
"No Available Serv
Repository: incubator-trafodion
Updated Branches:
refs/heads/master 83304c219 -> 496b1b02c
TRAFODION-1765 - trafci would throw an error when set statistics on
TRAFODION-1757 - 1) DCS stop script still not handling zookeeper error properly
2) No indication in DCS logs for "No Available Servers" unless
debug level is enabled.
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/5854197f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/5854197f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/5854197f
Branch: refs/heads/master
Commit: 5854197fd4b126d0df054d7f74714214ddc7d41b
Parents: 611b556
Author: Arvind Narain <ar...@apache.org>
Authored: Mon Feb 22 20:26:39 2016 +0000
Committer: Arvind Narain <ar...@apache.org>
Committed: Mon Feb 22 20:26:39 2016 +0000
----------------------------------------------------------------------
core/conn/trafci/manualtests/README | 47 ++++++++++++++++
core/conn/trafci/manualtests/statcheck.sql | 47 ++++++++++++++++
.../src/org/trafodion/ci/DatabaseQuery.java | 3 +-
dcs/bin/stop-dcs.sh | 2 +-
.../dcs/master/listener/ConnectReply.java | 59 ++++++++++----------
5 files changed, 126 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5854197f/core/conn/trafci/manualtests/README
----------------------------------------------------------------------
diff --git a/core/conn/trafci/manualtests/README b/core/conn/trafci/manualtests/README
new file mode 100644
index 0000000..69cafff
--- /dev/null
+++ b/core/conn/trafci/manualtests/README
@@ -0,0 +1,47 @@
+# @@@ START COPYRIGHT @@@
+#
+# 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.
+#
+# @@@ END COPYRIGHT @@@
+
+README for TRAFCI manualtests
+=============================
+
+This directory contains manual tests used to validate fixes for trafci. Eventual goal is to automate these tests.
+
+To run any one specfic test, invoke a trafci session and obey the corresponding test file.
+
+statcheck.sql - TRAFODION-1765 reported that if statistics are on for a
+ session, then execution of queries resulted in the following
+ error:
+ "*** ERROR[29003] Statement does not exist"
+
+ This was a regression due to fix for TRAFODION-1709.
+
+ To check for TRAFODION-1709 do the following while running
+ this test:
+
+ cd $MY_SQROOT/export/limited-support-tools/LSO
+ ./offender -s active -t 300
+
+ For direct execute queries the EXECUTE_STATE should be
+ DEALLOCATED.
+
+ For prepare/execute queries the EXECUTE_STATE should be
+ CLOSE.
+
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5854197f/core/conn/trafci/manualtests/statcheck.sql
----------------------------------------------------------------------
diff --git a/core/conn/trafci/manualtests/statcheck.sql b/core/conn/trafci/manualtests/statcheck.sql
new file mode 100644
index 0000000..2c9422e
--- /dev/null
+++ b/core/conn/trafci/manualtests/statcheck.sql
@@ -0,0 +1,47 @@
+--
+-- @@@ START COPYRIGHT @@@
+--
+-- 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.
+--
+-- @@@ END COPYRIGHT @@@
+--
+
+create schema trafci_manual;
+set schema trafci_manual;
+
+-- with statistics off
+
+create table stat_check ( a int );
+insert into stat_check values (1);
+
+select * from stat_check;
+prepare s1 from select * from stat_check;
+execute s1;
+
+-- with statistics on
+set statistics on;
+
+select * from stat_check;
+get statistics;
+prepare s2 from select * from stat_check;
+execute s2;
+get statistics;
+
+set statistics off;
+drop table stat_check;
+drop schema trafci_manual;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5854197f/core/conn/trafci/src/org/trafodion/ci/DatabaseQuery.java
----------------------------------------------------------------------
diff --git a/core/conn/trafci/src/org/trafodion/ci/DatabaseQuery.java b/core/conn/trafci/src/org/trafodion/ci/DatabaseQuery.java
index eb04fd8..8b8b2ac 100644
--- a/core/conn/trafci/src/org/trafodion/ci/DatabaseQuery.java
+++ b/core/conn/trafci/src/org/trafodion/ci/DatabaseQuery.java
@@ -1163,9 +1163,10 @@ public class DatabaseQuery extends QueryWrapper
super.setQueryRowCount(stmt);
sessObj.setQryEndTime();
}
-
+
stmt.close();
sessObj.setStmtObj(sessObj.getConnObj().createStatement());
+ this.stmt=sessObj.getStmtObj();
resetQryObj();
}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5854197f/dcs/bin/stop-dcs.sh
----------------------------------------------------------------------
diff --git a/dcs/bin/stop-dcs.sh b/dcs/bin/stop-dcs.sh
index 3259117..fbb1818 100755
--- a/dcs/bin/stop-dcs.sh
+++ b/dcs/bin/stop-dcs.sh
@@ -41,7 +41,7 @@ fi
master=`$bin/dcs --config "${DCS_CONF_DIR}" org.trafodion.dcs.zookeeper.ZkUtil /$USER/dcs/master|tail -n 1`
errCode=$?
zkerror=`echo $master| grep -i error`
-if ( [ $errCode -ne 0 ] || [ ! -z $zkerror ] );
+if ( [ ${errCode} -ne 0 ] || [ -n "${zkerror}" ] );
then
echo "Zookeeper exception occurred, killing all DcsMaster and DcsServers..."
"$bin"/dcs-daemon.sh --config "${DCS_CONF_DIR}" stop master
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5854197f/dcs/src/main/java/org/trafodion/dcs/master/listener/ConnectReply.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/master/listener/ConnectReply.java b/dcs/src/main/java/org/trafodion/dcs/master/listener/ConnectReply.java
index 482f61a..4c1a558 100644
--- a/dcs/src/main/java/org/trafodion/dcs/master/listener/ConnectReply.java
+++ b/dcs/src/main/java/org/trafodion/dcs/master/listener/ConnectReply.java
@@ -1,25 +1,25 @@
-/**
-* @@@ START COPYRIGHT @@@
-
-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.
+//
+// @@@ START COPYRIGHT @@@
+//
+// 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.
-* @@@ END COPYRIGHT @@@
- */
+// @@@ END COPYRIGHT @@@
+//
package org.trafodion.dcs.master.listener;
import java.sql.SQLException;
@@ -173,7 +173,7 @@ class ConnectReply {
nodeRegisteredPath = registeredPath + "/" + server;
if(LOG.isDebugEnabled())
LOG.debug(clientSocketAddress + ": " + " index " + index + " server picked " + server );
- data = isServerAvalible(nodeRegisteredPath);
+ data = isServerAvailable(nodeRegisteredPath);
if(data != null){
found = true;
break;
@@ -190,7 +190,7 @@ class ConnectReply {
if(LOG.isDebugEnabled())
LOG.debug(clientSocketAddress + ": " + "server selected in search 1 " + server );
- data = isServerAvalible(nodeRegisteredPath);
+ data = isServerAvailable(nodeRegisteredPath);
if(data != null){
found = true;
break;
@@ -209,7 +209,7 @@ class ConnectReply {
if(LOG.isDebugEnabled())
LOG.debug(clientSocketAddress + ": " + "server selected in search 2 " + server );
- data = isServerAvalible(nodeRegisteredPath);
+ data = isServerAvailable(nodeRegisteredPath);
if(data != null){
found = true;
break;
@@ -275,11 +275,10 @@ class ConnectReply {
if (found == false || exceptionThrown == true){
exception.exception_nr = ListenerConstants.DcsMasterNoSrvrHdl_exn; //no available servers
replyException = true;
- if(LOG.isDebugEnabled()){
- if (found == false)
- LOG.info(clientSocketAddress + ": " + "No Available Servers");
- else
- LOG.info(clientSocketAddress + ": " + "No Available Servers - exception thrown");
+ if (found == false)
+ LOG.error(clientSocketAddress + ": " + "No Available Servers");
+ else
+ LOG.error(clientSocketAddress + ": " + "No Available Servers - exception thrown");
}
} else {
@@ -314,7 +313,7 @@ class ConnectReply {
return replyException;
}
- private byte[] isServerAvalible(String serverPath) throws KeeperException, InterruptedException {
+ private byte[] isServerAvailable(String serverPath) throws KeeperException, InterruptedException {
Stat stat = zkc.exists(serverPath,false);
if(stat != null){
byte[] data = zkc.getData(serverPath, false, stat);
[2/4] incubator-trafodion git commit: Fix error
Posted by db...@apache.org.
Fix error
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/3cf3fefa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/3cf3fefa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/3cf3fefa
Branch: refs/heads/master
Commit: 3cf3fefa745576b7a4360dc3d6238d9fa7fc06f1
Parents: 5854197
Author: Arvind Narain <ar...@apache.org>
Authored: Mon Feb 22 21:40:04 2016 +0000
Committer: Arvind Narain <ar...@apache.org>
Committed: Mon Feb 22 21:40:04 2016 +0000
----------------------------------------------------------------------
.../main/java/org/trafodion/dcs/master/listener/ConnectReply.java | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/3cf3fefa/dcs/src/main/java/org/trafodion/dcs/master/listener/ConnectReply.java
----------------------------------------------------------------------
diff --git a/dcs/src/main/java/org/trafodion/dcs/master/listener/ConnectReply.java b/dcs/src/main/java/org/trafodion/dcs/master/listener/ConnectReply.java
index 4c1a558..1b4ec45 100644
--- a/dcs/src/main/java/org/trafodion/dcs/master/listener/ConnectReply.java
+++ b/dcs/src/main/java/org/trafodion/dcs/master/listener/ConnectReply.java
@@ -279,7 +279,6 @@ class ConnectReply {
LOG.error(clientSocketAddress + ": " + "No Available Servers");
else
LOG.error(clientSocketAddress + ": " + "No Available Servers - exception thrown");
- }
} else {
if (cc.datasource.length() == 0)
[4/4] incubator-trafodion git commit: Merge [TRAFODION-1765] PR 335
Fix trafci bug when set statistics is on
Posted by db...@apache.org.
Merge [TRAFODION-1765] PR 335 Fix trafci bug when set statistics is on
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/496b1b02
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/496b1b02
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/496b1b02
Branch: refs/heads/master
Commit: 496b1b02cbfef900be45901695105c301ec3ef1b
Parents: 83304c2 2a954d9
Author: Dave Birdsall <db...@apache.org>
Authored: Wed Feb 24 16:22:32 2016 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Wed Feb 24 16:22:32 2016 +0000
----------------------------------------------------------------------
core/conn/trafci/manualtests/README | 50 ++++++++++++++++
core/conn/trafci/manualtests/statcheck.sql | 47 +++++++++++++++
.../src/org/trafodion/ci/DatabaseQuery.java | 3 +-
dcs/bin/stop-dcs.sh | 2 +-
.../dcs/master/listener/ConnectReply.java | 60 ++++++++++----------
5 files changed, 129 insertions(+), 33 deletions(-)
----------------------------------------------------------------------
[3/4] incubator-trafodion git commit: Enter description of previous
JIRA in README.
Posted by db...@apache.org.
Enter description of previous JIRA in README.
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/2a954d9e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/2a954d9e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/2a954d9e
Branch: refs/heads/master
Commit: 2a954d9e5bd29e92cb3afe3516eb6f3bb6ea05d1
Parents: 3cf3fef
Author: Arvind Narain <ar...@apache.org>
Authored: Mon Feb 22 22:25:28 2016 +0000
Committer: Arvind Narain <ar...@apache.org>
Committed: Mon Feb 22 22:25:28 2016 +0000
----------------------------------------------------------------------
core/conn/trafci/manualtests/README | 5 ++++-
core/conn/trafci/manualtests/statcheck.sql | 6 +++---
2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a954d9e/core/conn/trafci/manualtests/README
----------------------------------------------------------------------
diff --git a/core/conn/trafci/manualtests/README b/core/conn/trafci/manualtests/README
index 69cafff..35ed5d4 100644
--- a/core/conn/trafci/manualtests/README
+++ b/core/conn/trafci/manualtests/README
@@ -31,7 +31,10 @@ statcheck.sql - TRAFODION-1765 reported that if statistics are on for a
error:
"*** ERROR[29003] Statement does not exist"
- This was a regression due to fix for TRAFODION-1709.
+ This was a regression due to fix for TRAFODION-1709:
+
+ When issuing an execdirect sql statement via trafci
+ the statements are not being deallocated.
To check for TRAFODION-1709 do the following while running
this test:
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2a954d9e/core/conn/trafci/manualtests/statcheck.sql
----------------------------------------------------------------------
diff --git a/core/conn/trafci/manualtests/statcheck.sql b/core/conn/trafci/manualtests/statcheck.sql
index 2c9422e..d309968 100644
--- a/core/conn/trafci/manualtests/statcheck.sql
+++ b/core/conn/trafci/manualtests/statcheck.sql
@@ -29,17 +29,17 @@ set schema trafci_manual;
create table stat_check ( a int );
insert into stat_check values (1);
-select * from stat_check;
prepare s1 from select * from stat_check;
execute s1;
+select * from stat_check;
+get statistics;
-- with statistics on
set statistics on;
-select * from stat_check;
-get statistics;
prepare s2 from select * from stat_check;
execute s2;
+select * from stat_check;
get statistics;
set statistics off;