CDV ❯ Incompatibility Error message is too obtuse.
-
New Feature
-
Status: Closed
-
2 Major
-
Resolution: Fixed
-
-
-
kkannaiy
-
Reporter: siyer
-
April 02, 2008
-
0
-
Watchers: 0
-
February 12, 2013
-
May 28, 2008
Description
On migration from 2.4.8 to 2.5.2 cgallimo on the forum reports (http://forums.terracotta.org/forums/posts/list/940.page) that L2 asserts with the following exception.
Probably due to lack of backward compatibility from 2.5.2 to 2.4.8 for the data-store in question. This needs to be confirmed and the error message thrown should be something meaningful to the end-user.
2008-04-02 09:35:45,884 INFO - JMX Server started. Available at URL[service:jmx:jmxmp://0.0.0.0:9520]
java.lang.AssertionError: Unknown type : 0
at com.tc.net.groups.NodeIDSerializer.getImpl(NodeIDSerializer.java:73)
at com.tc.net.groups.NodeIDSerializer.readNodeID(NodeIDSerializer.java:61)
at com.tc.object.tx.ServerTransactionID.createFrom(ServerTransactionID.java:96)
at com.tc.objectserver.persistence.sleepycat.TransactionPersistorImpl.bytes2ServerTxnID(TransactionPersistorImpl.java:86)
at com.tc.objectserver.persistence.sleepycat.TransactionPersistorImpl.loadAllGlobalTransactionDescriptors(TransactionPersistorImpl.java:50)
at com.tc.objectserver.persistence.impl.TransactionStoreImpl.
Comments
Fiona OShea 2008-04-03
Saravanan Subbiah 2008-05-02
Someday we have to support version upgrades for the DB.
There is already a clusterStateStore in SleepycatPersistor which is basically a persisted map.
Store the DB version when first creating it and check when ever starting to see if the version matches.
In future if we change the format, we can run an upgrade script that upgrades the DB to the next version.
Raghvendra Singh 2008-05-28
Added version check and appropriate message.
Manoj Govindassamy 2008-07-09
DB Version checks are available from TC release 2.6.
On a fresh installation of 2.6, when Server is started the following will be seen in the logs.
2008-07-09 16:34:23,092 [main] INFO com.terracottatech.dso - Sleepy Cat DB version is 1.0
On a fresh installation of 2.7, when Server is started the following will be seen in the logs.
2008-07-09 16:41:01,026 [main] INFO com.terracottatech.dso - Sleepycat DB version [2.0]
When 2.7 server is started with 2.6 data store, the follwing error is seen
java.lang.AssertionError: There is a mismatch in Terracotta and DB data format. Please ensure that both Terracotta Server and DB are upgraded to the same version. Expected : 2.0 Actual: 1.0 at com.tc.objectserver.persistence.sleepycat.DBVersionChecker.versionCheck(DBVersionChecker.java:57) at com.tc.objectserver.persistence.sleepycat.SleepycatPersistor.sanityCheckAndClean(SleepycatPersistor.java:132) at com.tc.objectserver.persistence.sleepycat.SleepycatPersistor.
(SleepycatPersistor.java:65) at com.tc.objectserver.impl.DistributedObjectServer.start(DistributedObjectServer.java:436) at com.tc.server.TCServerImpl.startDSOServer(TCServerImpl.java:359) at com.tc.server.TCServerImpl.access$500(TCServerImpl.java:69) at com.tc.server.TCServerImpl$StartAction.execute(TCServerImpl.java:326) at com.tc.lang.StartupHelper.startUp(StartupHelper.java:39) at com.tc.server.TCServerImpl.startServer(TCServerImpl.java:352) at com.tc.server.TCServerImpl.start(TCServerImpl.java:165) at com.tc.server.TCServerMain.main(TCServerMain.java:28)
Kalai Kannaiyan 2008-07-10
Tested with 2.6.3-nightly-rev9111 and 2.7 (trunk-nightly-rev9117), DB version mismatch message is displayed as expected.
Steps:
- Install the 2.6 kit (2.6.3-nightly-rev9111)
- Edit the tc-config.xml with persistence on
- start the TC server -> ./start-tc-server.sh
- objectdb folder is created under /export1/dev/kalai/terracotta/server-data
Actual: Server started successfully and DB version is logged into terracotta-server.log 2008-07-10 14:11:45,126 [main] INFO com.terracottatech.dso - Sleepy Cat DB version is 1.0 is displayed in the terracotta-server.log
- kill the server
- Install the 2.7 kit ((trunk-nightly-rev9117)
- repeat the steps 2 and 3 pointed to the same objectdb folder
Actual: Server failed to start with DB version mismatch (which is expected)
2008-07-10 14:15:31,308 [main] ERROR com.tc.server.TCServerMain - Thread:Thread[main,5,main] got an uncaught exception. calling CallbackOnExitDefaultHandlers.
java.lang.AssertionError: There is a mismatch in Terracotta and DB data format. Please ensure that both Terracotta Server and DB are upgraded to the same version. Expected : 2.0 Actual: 1.0
at com.tc.objectserver.persistence.sleepycat.DBVersionChecker.versionCheck(DBVersionChecker.java:56)
at com.tc.objectserver.persistence.sleepycat.SleepycatPersistor.sanityCheckAndClean(SleepycatPersistor.java:132)
at com.tc.objectserver.persistence.sleepycat.SleepycatPersistor.
Manoj Govindassamy 2008-07-11
AssertionError has been replaced DBVersionMismatchException (trunk r9163)
bin$ ./start-tc-server.sh -f ~/Desktop/wrk/tc-config-mac-mac.xml -n s1
2008-07-11 12:19:41,959 INFO - Terracotta 2.6.0-SNAPSHOT, as of 20080711-120716 (Revision 9162 by [email protected] from trunk)
2008-07-11 12:19:42,668 INFO - Configuration loaded from the file at ‘/Users/mgovinda/Desktop/wrk/tc-config-mac-mac.xml’.
2008-07-11 12:19:42,711 INFO - Log file: ‘/tmp/TC/S1/logs/terracotta-server.log’.
2008-07-11 12:19:45,169 INFO - Statistics store: ‘/Users/mgovinda/Desktop/wrk/statistics’.
2008-07-11 12:19:47,607 INFO - Statistics buffer: ‘/Users/mgovinda/Desktop/wrk/statistics’.
2008-07-11 12:19:47,683 INFO - JMX Server started. Available at URL[service:jmx:jmxmp://0.0.0.0:9520]
com.tc.objectserver.persistence.sleepycat.DBVersionMismatchException: There is a mismatch in Terracotta and DB data format. Please ensure that both Terracotta Server and DB are upgraded to the same version. Expected : 2.0 Actual: 1.0
at com.tc.objectserver.persistence.sleepycat.DBVersionChecker.versionCheck(DBVersionChecker.java:56)
at com.tc.objectserver.persistence.sleepycat.SleepycatPersistor.sanityCheckAndClean(SleepycatPersistor.java:132)
at com.tc.objectserver.persistence.sleepycat.SleepycatPersistor.
Add check in DB for version