Description
Crash was done manually when compress was almost in the end.
Log trace before the crash:
DEBUG LogTrace OUTPUT: Write log record: tranId=14527 instant: (23,6270154) leng
th: 20BeginXact null transactionStatus 0
DEBUG LogTrace OUTPUT: Write log record: tranId=14527 instant: (23,6270190) leng
th: 25
Page Operation: Page(0,Container(0, 768)) pageVersion 9567 : CompressSpaceOpera
tion: newHighestPage = 0;num_pages_truncated = 956 to Page(0,Container(0, 768))
DEBUG LogTrace OUTPUT: Flush log to 1350071
DEBUG LogTrace OUTPUT: Write log record: tranId=Null instant: (23,6251544) lengt
h: 21
Checksum Operation algorithm = 1 value = 3588488 data length= 18650
DEBUG LogTrace OUTPUT: Begin log sync...
DEBUG LogTrace OUTPUT: end log sync.
DEBUG LogTrace OUTPUT: Flush log to 6270235
DEBUG LogTrace OUTPUT: Begin log sync...
DEBUG LogTrace OUTPUT: end log sync.
DEBUG LogTrace OUTPUT: Write log record: tranId=14527 instant: (24,61) length: 1
7
EndXact null Committed : transactionStatus = Committed
—
C:\suresht\databases>java -Dij.protocol=jdbc:derby: org.apache.derby.tools.ij
ij version 10.1
ij> call SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE('APP' , 'T1' , 1 , 1, 1) ;
IJ ERROR: Unable to establish connection
ij> connect 'jdbc:derby:wombat';
ERROR XJ040: Failed to start database 'wombat', see the next exception for detai
ls.
ERROR XSDB1: Unknown page format at page Page(102,Container(0, 768))
ij>
What was done on the DB :
$ rm -rf wombat
$ ij
C:\suresht\databases>rem set DERBY_INSTALL=
C:\suresht\databases>java -Dij.protocol=jdbc:derby: org.apache.derby.tools.ij
ij version 10.1
ij> Terminate batch job (Y/N)? ^C
$ ij
C:\suresht\databases>rem set DERBY_INSTALL=
C:\suresht\databases>java -Dij.protocol=jdbc:derby: org.apache.derby.tools.ij
ij version 10.1
ij> connect 'jdbc:derby:wombat;create=true';
ij> create table t1(a int ) ;
0 rows inserted/updated/deleted
ij> insert into t1 values(1) ;
1 row inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
1 row inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
2 rows inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
4 rows inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
8 rows inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
16 rows inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
32 rows inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
64 rows inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
128 rows inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
256 rows inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
512 rows inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
1024 rows inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
2048 rows inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
4096 rows inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
8192 rows inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
16384 rows inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
32768 rows inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
65536 rows inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
131072 rows inserted/updated/deleted
ij> insert into t1 select a + 1 from t1 ;
262144 rows inserted/updated/deleted
ij> commit ;
ij> delete from t1 ;
524288 rows inserted/updated/deleted
ij> select * from new org.apache.derby.diag.SpaceTable('T1') ;
ERROR 42X01: Syntax error: Encountered "<EOF>" at line 1, column 57.
ij> select * from new org.apache.derby.diag.SpaceTable('T1') t ;
CONGLOMERATENAME
ISIND& | NUMALLOCATEDPAGES | NUM FREEPAGES |
NUMUNFILLEDPAGES | PAGESIZE | ESTIMSPACESAVING -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------------------------------------------- T1 |
0 | 1 | 382 6 |
1 | 4096 | 15671296 |
1 row selected
ij> select NUMALLOCATEDPAGES from new org.apache.derby.diag.SpaceTable('T1') t ;
NUMALLOCATEDPAGES
--------------------
1
1 row selected
ij> select NUMAFREEPAGES from new org.apache.derby.diag.SpaceTable('T1') t ;
ERROR 42X04: Column 'NUMAFREEPAGES' is either not in any table in the FROM list
or appears within a join specification and is outside the scope of the join spec
ification or appears in a HAVING clause and is not in the GROUP BY list. If this
is a CREATE or ALTER TABLE statement then 'NUMAFREEPAGES' is not a column in t
he target table.
ij> select NUMFREEPAGES from new org.apache.derby.diag.SpaceTable('T1') t ;
NUMFREEPAGES
--------------------
3826
1 row selected
ij> call SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE('APP' , 'T1' , 1 , 1, 1) ;
0 rows inserted/updated/deleted
ij> select NUMFREEPAGES from new org.apache.derby.diag.SpaceTable('T1') t ;
NUMFREEPAGES
--------------------
0
1 row selected
ij> select * from new org.apache.derby.diag.SpaceTable('T1') t ;
CONGLOMERATENAME
ISIND& | NUMALLOCATEDPAGES | NUM FREEPAGES |
NUMUNFILLEDPAGES | PAGESIZE | ESTIMSPACESAVING -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------------------------------------------- T1 |
0 | 1 | 0 | |||
1 | 4096 | 0 |
1 row selected
ij> ^CTerminate batch job (Y/N)? ^C
$ ij\
>
$ ij
C:\suresht\databases>rem set DERBY_INSTALL=
C:\suresht\databases>java -Dij.protocol=jdbc:derby: org.apache.derby.tools.ij
ij version 10.1
ij> connect 'jdbc:derby:wombat';
ij> select * from t1 ;
A
-----------
0 rows selected
ij> insert into t1 values(1) ;
1 row inserted/updated/deleted
ij> insert into t1 select * from t1 ;
1 row inserted/updated/deleted
ij> insert into t1 select * from t1 ;
2 rows inserted/updated/deleted
ij> insert into t1 select * from t1 ;
4 rows inserted/updated/deleted
ij> insert into t1 select a+1 from t1 ;
8 rows inserted/updated/deleted
ij> insert into t1 select a+1 from t1 ;
16 rows inserted/updated/deleted
ij> insert into t1 select a+1 from t1 ;
32 rows inserted/updated/deleted
ij> insert into t1 select a+1 from t1 ;
64 rows inserted/updated/deleted
ij> insert into t1 select a+1 from t1 ;
128 rows inserted/updated/deleted
ij> insert into t1 select a+1 from t1 ;
256 rows inserted/updated/deleted
ij> insert into t1 select a+1 from t1 ;
512 rows inserted/updated/deleted
ij> insert into t1 select a+1 from t1 ;
1024 rows inserted/updated/deleted
ij> insert into t1 select a+1 from t1 ;
2048 rows inserted/updated/deleted
ij> insert into t1 select a+1 from t1 ;
4096 rows inserted/updated/deleted
ij> insert into t1 select a+1 from t1 ;
8192 rows inserted/updated/deleted
ij> insert into t1 select a+1 from t1 ;
16384 rows inserted/updated/deleted
ij> insert into t1 select a+1 from t1 ;
32768 rows inserted/updated/deleted
ij> insert into t1 select a+1 from t1 ;
65536 rows inserted/updated/deleted
ij> delete from t1 ;
131072 rows inserted/updated/deleted
ij> select * from new org.apache.derby.diag.SpaceTable('T1') t ;
CONGLOMERATENAME
ISIND& | NUMALLOCATEDPAGES | NUM FREEPAGES |
NUMUNFILLEDPAGES | PAGESIZE | ESTIMSPACESAVING -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------------------------------------------------------------------- T1 |
0 | 1 | 956 | |||
0 | 4096 | 3915776 |
1 row selected
ij> call SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE('APP' , 'T1' , 1 , 1, 1) ;
0 rows inserted/updated/deleted
ij> Terminate batch job (Y/N)? ^C
$ ij
C:\suresht\databases>rem set DERBY_INSTALL=
C:\suresht\databases>java -Dij.protocol=jdbc:derby: org.apache.derby.tools.ij
ij version 10.1
ij> call SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE('APP' , 'T1' , 1 , 1, 1) ;
IJ ERROR: Unable to establish connection
ij> connect 'jdbc:derby:wombat';
ERROR XJ040: Failed to start database 'wombat', see the next exception for detai
ls.
ERROR XSDB1: Unknown page format at page Page(102,Container(0, 768))
ij>
Stacks:
pageVersion 8611 : Change page allocation status of 102 to 1(undo 0) instant =
(23,6494) logEnd = (23,6536) logIn at 22 available 4
DEBUG LogTrace OUTPUT: scanned 12606 : Page Operation: Page(102,Container(0, 768
)) pageVersion 412 : Invalidate Page - it has been deallocated instant = (23,653
6) logEnd = (23,6574) logIn at 18 available 4
------------ BEGIN SHUTDOWN ERROR STACK -------------
ERROR XSLA7: Cannot redo operation Page Operation: Page(102,Container(0, 768)) p
ageVersion 412 : Invalidate Page - it has been deallocated in the log.
at org.apache.derby.iapi.error.StandardException.newException(StandardEx
ception.java:315)
at org.apache.derby.impl.store.raw.log.FileLogger.redo(FileLogger.java:1
515)
at org.apache.derby.impl.store.raw.log.LogToFile.recover(LogToFile.java:
798)
at org.apache.derby.impl.store.raw.RawStore.boot(RawStore.java:323)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.j
ava:1985)
at org.apache.derby.impl.services.monitor.TopService.bootModule(TopServi
ce.java:290)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMo
nitor.java:539)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Moni
tor.java:418)
at org.apache.derby.impl.store.access.RAMAccessManager.boot(RAMAccessMan
ager.java:994)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.j
ava:1985)
at org.apache.derby.impl.services.monitor.TopService.bootModule(TopServi
ce.java:290)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMo
nitor.java:539)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Moni
tor.java:418)
at org.apache.derby.impl.db.BasicDatabase.bootStore(BasicDatabase.java:7
57)
at org.apache.derby.impl.db.BasicDatabase.boot(BasicDatabase.java:178)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.j
ava:1985)
at org.apache.derby.impl.services.monitor.TopService.bootModule(TopServi
ce.java:290)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMo
nitor.java:1832)
at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderServi
ce(BaseMonitor.java:1698)
at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndSta
rtService(BaseMonitor.java:1577)
at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentSer
vice(BaseMonitor.java:996)
at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentSer
vice(BaseMonitor.java:988)
at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService
(Monitor.java:533)
at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnecti
on.java:1551)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.jav
a:196)
at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(EmbedConnection30
.java:72)
at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Driver30.java:73
)
at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:183)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at org.apache.derby.impl.tools.ij.ij.dynamicConnection(ij.java:836)
at org.apache.derby.impl.tools.ij.ij.ConnectStatement(ij.java:698)
at org.apache.derby.impl.tools.ij.ij.ijStatement(ij.java:528)
at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:289)
at org.apache.derby.impl.tools.ij.Main.go(Main.java:203)
at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:169)
at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55)
at org.apache.derby.tools.ij.main(ij.java:60)
============= begin nested exception, level (1) ===========
ERROR XSDB1: Unknown page format at page Page(102,Container(0, 768))
at org.apache.derby.iapi.error.StandardException.newException(StandardEx
ception.java:315)
at org.apache.derby.impl.store.raw.data.CachedPage.changeInstanceTo(Cach
edPage.java:315)
at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(CachedPag
e.java:195)
at org.apache.derby.impl.services.cache.CachedItem.takeOnIdentity(Cached
Item.java:235)
at org.apache.derby.impl.services.cache.Clock.addEntry(Clock.java:798)
at org.apache.derby.impl.services.cache.Clock.find(Clock.java:303)
at org.apache.derby.impl.store.raw.data.FileContainer.getAnyPage(FileCon
tainer.java:2430)
at org.apache.derby.impl.store.raw.data.BaseContainer.getAnyPage(BaseCon
tainer.java:473)
at org.apache.derby.impl.store.raw.data.BaseContainerHandle.getAnyPage(B
aseContainerHandle.java:590)
at org.apache.derby.impl.store.raw.data.PageBasicOperation.findpage(Page
BasicOperation.java:303)
at org.apache.derby.impl.store.raw.data.PageBasicOperation.needsRedo(Pag
eBasicOperation.java:159)
at org.apache.derby.impl.store.raw.log.FileLogger.redo(FileLogger.java:1
394)
at org.apache.derby.impl.store.raw.log.LogToFile.recover(LogToFile.java:
798) at org.apache.derby.impl.store.raw.RawStore.boot(RawStore.java:323)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.j
ava:1985)
at org.apache.derby.impl.services.monitor.TopService.bootModule(TopServi
ce.java:290)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMo
nitor.java:539)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Moni
tor.java:418)
at org.apache.derby.impl.store.access.RAMAccessManager.boot(RAMAccessMan
ager.java:994)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.j
ava:1985)
at org.apache.derby.impl.services.monitor.TopService.bootModule(TopServi
ce.java:290)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMo
nitor.java:539)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Moni
tor.java:418)
at org.apache.derby.impl.db.BasicDatabase.bootStore(BasicDatabase.java:7
57)
at org.apache.derby.impl.db.BasicDatabase.boot(BasicDatabase.java:178)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.j
ava:1985)
at org.apache.derby.impl.services.monitor.TopService.bootModule(TopServi
ce.java:290)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMo
nitor.java:1832)
at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderServi
ce(BaseMonitor.java:1698)
at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndSta
rtService(BaseMonitor.java:1577)
at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentSer
vice(BaseMonitor.java:996)
at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentSer
vice(BaseMonitor.java:988)
at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService
(Monitor.java:533)
at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnecti
on.java:1551)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.jav
a:196)
at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(EmbedConnection30
.java:72)
at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Driver30.java:73
)
at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:183)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at org.apache.derby.impl.tools.ij.ij.dynamicConnection(ij.java:836)
at org.apache.derby.impl.tools.ij.ij.ConnectStatement(ij.java:698)
at org.apache.derby.impl.tools.ij.ij.ijStatement(ij.java:528)
at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:289)
at org.apache.derby.impl.tools.ij.Main.go(Main.java:203)
at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:169)
at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55)
at org.apache.derby.tools.ij.main(ij.java:60)
============= end nested exception, level (1) ===========
============= begin nested exception, level (2) ===========
ERROR XBM0U: No class was registered for identifier 0.
at org.apache.derby.iapi.error.StandardException.newException(StandardEx
ception.java:311)
at org.apache.derby.impl.services.monitor.BaseMonitor.classFromIdentifie
r(BaseMonitor.java:648)
at org.apache.derby.impl.services.monitor.BaseMonitor.newInstanceFromIde
ntifier(BaseMonitor.java:661)
at org.apache.derby.iapi.services.monitor.Monitor.newInstanceFromIdentif
ier(Monitor.java:618)
at org.apache.derby.impl.store.raw.data.CachedPage.changeInstanceTo(Cach
edPage.java:303)
at org.apache.derby.impl.store.raw.data.CachedPage.setIdentity(CachedPag
e.java:195)
at org.apache.derby.impl.services.cache.CachedItem.takeOnIdentity(Cached
Item.java:235)
at org.apache.derby.impl.services.cache.Clock.addEntry(Clock.java:798)
at org.apache.derby.impl.services.cache.Clock.find(Clock.java:303)
-More- at org.apache.derby.impl.store.raw.data.FileContainer.getAnyPage(FileCon
tainer.java:2430)
at org.apache.derby.impl.store.raw.data.BaseContainer.getAnyPage(BaseCon
tainer.java:473)
at org.apache.derby.impl.store.raw.data.BaseContainerHandle.getAnyPage(B
aseContainerHandle.java:590)
at org.apache.derby.impl.store.raw.data.PageBasicOperation.findpage(Page
BasicOperation.java:303)
at org.apache.derby.impl.store.raw.data.PageBasicOperation.needsRedo(Pag
eBasicOperation.java:159)
at org.apache.derby.impl.store.raw.log.FileLogger.redo(FileLogger.java:1
394)
at org.apache.derby.impl.store.raw.log.LogToFile.recover(LogToFile.java:
798)
at org.apache.derby.impl.store.raw.RawStore.boot(RawStore.java:323)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.j
ava:1985)
at org.apache.derby.impl.services.monitor.TopService.bootModule(TopServi
ce.java:290)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMo
nitor.java:539)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Moni
tor.java:418)
at org.apache.derby.impl.store.access.RAMAccessManager.boot(RAMAccessMan
ager.java:994)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.j
ava:1985)
at org.apache.derby.impl.services.monitor.TopService.bootModule(TopServi
ce.java:290)
at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(BaseMo
nitor.java:539)
at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Moni
tor.java:418)
at org.apache.derby.impl.db.BasicDatabase.bootStore(BasicDatabase.java:7
57)
at org.apache.derby.impl.db.BasicDatabase.boot(BasicDatabase.java:178)
at org.apache.derby.impl.services.monitor.BaseMonitor.boot(BaseMonitor.j
ava:1985)
at org.apache.derby.impl.services.monitor.TopService.bootModule(TopServi
ce.java:290)
at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(BaseMo
nitor.java:1832)
at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderServi
ce(BaseMonitor.java:1698)
at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndSta
rtService(BaseMonitor.java:1577)
at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentSer
vice(BaseMonitor.java:996)
at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentSer
vice(BaseMonitor.java:988)
at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService
(Monitor.java:533)
at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(EmbedConnecti
on.java:1551)
at org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnection.jav
a:196)
at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(EmbedConnection30
.java:72)
at org.apache.derby.jdbc.Driver30.getNewEmbedConnection(Driver30.java:73
)
at org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java:183)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at org.apache.derby.impl.tools.ij.ij.dynamicConnection(ij.java:836)
at org.apache.derby.impl.tools.ij.ij.ConnectStatement(ij.java:698)
at org.apache.derby.impl.tools.ij.ij.ijStatement(ij.java:528)
at org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:289)
at org.apache.derby.impl.tools.ij.Main.go(Main.java:203)
at org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:169)
at org.apache.derby.impl.tools.ij.Main14.main(Main14.java:55)
at org.apache.derby.tools.ij.main(ij.java:60)
============= end nested exception, level (2) ===========
-More-