Comment 4 for bug 1028016

Revision history for this message
Peter Beaman (pbeaman) wrote :

Found.

This bug was caused by a configuration change in Akiban Server and a poorly handled condition in the JournalManager.

The configuration change was to remove the akiban_txn.v0 volume from the default server configuration file. That volume is a vestige of the old pre-MVCC Persistit transaction mechanism, is no longer needed, and was rightfully removed.

However, the system in question began its journal before that configuration change, and as a result has a copy of page 0 for a volume by that name in the page map. Of note: the file is still present on the host system, but Akiban Server no longer opens the volume.

The final piece of the bug is that in JournalManager#readForCopy, there is faulty handling of this situation. In fact, there is a TODO comment indicating something different should be done. In general the JournalManager is defensive. Its first priority is not to lose any data, so given that it can't find a way to write the page to the correct volume it simply retains it. And that's what it did while writing over 100 journal files.

To fix this we should do the following:

1. Add ERROR level log message and an Alert triggered when this situation arises.
2. Add a way to tell Persistit that the volume in question will never exist again so that Persistit can simply discard the pages.

In the meantime, to work around the problem in Akiban Server (which will happen only in sites that had a version of server before r1801), we can add a configuration parameter to server.properties that will allow the missing volume to be found and therefore make readForCopy happy. The presence of a file in the Akiban Server data directory named akiban_txn.v0 indicates that this might be necessary. Add the following line to server.properties to enable this:

persistit.volume.99=${datapath}/akiban_txn.v0,create,pageSize:16384,initialSize:16K,extensionSize:16K,maximumSize:64K

Other than cluttering the server.properties file this property has no appreciable cost and does not need to be removed later.