Sessions keeping metadata in cache/missing DML operations.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trafodion |
Fix Released
|
High
|
Mike Hanlon |
Bug Description
sqlci and dcs sessions are caching metadata and not refreshing when dml operations are being performed.
Using 2 sqlci sessions.
SESSION 1
/home/squser2> sqlci
Trafodion Conversational Interface 0.8.0
(c) Copyright 2014 Hewlett-Packard Development Company, LP.
>>SET SCHEMA TRAFODION.TESTSCH;
--- SQL operation complete.
>>CREATE TABLE TESTTABLE (
>>+ FIELD1 CHAR(10) NOT NULL
>>+ , FIELD2 CHAR(15) NOT NULL
>>+ , PRIMARY KEY (FIELD1 ASC)
>>+ );
--- SQL operation complete.
>>invoke testtable;
-- Definition of Trafodion table TRAFODION.
-- Definition current Thu Jun 12 15:07:45 2014
(
FIELD1 CHAR(10) CHARACTER SET ISO88591 COLLATE
DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
, FIELD2 CHAR(15) CHARACTER SET ISO88591 COLLATE
DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
)
PRIMARY KEY (FIELD1 ASC)
--- SQL operation complete.
SESSION 2 in a different window. Keep session 1's window opened.
/home/squser2> sqlci
Trafodion Conversational Interface 0.8.0
(c) Copyright 2014 Hewlett-Packard Development Company, LP.
>>SET SCHEMA TRAFODION.TESTSCH;
--- SQL operation complete.
>>get tables;
Tables in Schema TRAFODION.TESTSCH
====
TESTTABLE
--- SQL operation complete.
>>invoke testtable;
-- Definition of Trafodion table TRAFODION.
-- Definition current Thu Jun 12 15:07:38 2014
(
FIELD1 CHAR(10) CHARACTER SET ISO88591 COLLATE
DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
, FIELD2 CHAR(15) CHARACTER SET ISO88591 COLLATE
DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
)
PRIMARY KEY (FIELD1 ASC)
--- SQL operation complete.
NOW BACK TO SESSION 1. Keep session 2 window opened.
>>DROP TABLE TESTTABLE;
-- SQL operation complete.
>> CREATE TABLE TESTTABLE (
>>+ FIELD1 CHAR(10) NOT NULL
>>+ , FIELD2 CHAR(15) NOT NULL
>>+ , FIELD3 CHAR(10) NOT NULL
>>+ , FIELD4 CHAR(15) NOT NULL
>>+, PRIMARY KEY (FIELD1 ASC)
>>+ );
--- SQL operation complete.
>>invoke testtable;
-- Definition of Trafodion table TRAFODION.
-- Definition current Thu Jun 12 15:08:06 2014
(
FIELD1 CHAR(10) CHARACTER SET ISO88591 COLLATE
DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
, FIELD2 CHAR(15) CHARACTER SET ISO88591 COLLATE
DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
, FIELD3 CHAR(10) CHARACTER SET ISO88591 COLLATE
DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
, FIELD4 CHAR(15) CHARACTER SET ISO88591 COLLATE
DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
)
PRIMARY KEY (FIELD1 ASC)
--- SQL operation complete.
>>
BUT BACK ON SESSION 2:
>>invoke testtable;
-- Definition of Trafodion table TRAFODION.
-- Definition current Thu Jun 12 15:08:15 2014
(
FIELD1 CHAR(10) CHARACTER SET ISO88591 COLLATE
DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
, FIELD2 CHAR(15) CHARACTER SET ISO88591 COLLATE
DEFAULT NO DEFAULT NOT NULL NOT DROPPABLE
)
PRIMARY KEY (FIELD1 ASC)
--- SQL operation complete.
>>
Notice how session 2 still has the old form or table.
Changed in trafodion: | |
status: | New → Confirmed |
Changed in trafodion: | |
milestone: | none → r0.8 |
milestone: | r0.8 → r0.9 |
Changed in trafodion: | |
status: | Confirmed → In Progress |
This is the issue of metadata invalidation that we do not currently have in Trafodion.
A metadata change from one session does not trigger other sessions to detect
that a change has happened.
This is being looked at and we may use Query Invalidation infrastructure to implement it.
Assigning to Mike Hanlon who is looking at this.