fuzzydb icon indicating copy to clipboard operation
fuzzydb copied to clipboard

TxLogPlayback stalls if user class has disappeared from server classpath

Open nealeu opened this issue 14 years ago • 1 comments
trafficstars

We need a sensible strategy to deal with this, as it's a valid user scenario during development, but in production is a bigger challenge.

Ultimately, supporting a data mapping persistence mechanism might work better, but only really want to if we're going to map into a useful binary form.

Caused by: java.lang.UnsupportedOperationException
        at com.wwm.db.internal.server.txlog.TxLogReader.write(TxLogReader.java:77)
        at com.wwm.io.core.layer2.PacketCodec.send(PacketCodec.java:213)
        at com.wwm.io.core.layer2.PacketCodec.requestClassData(PacketCodec.java:117)
        at com.wwm.io.core.layer2.PacketCodec.handleMissingClass(PacketCodec.java:153)
        at com.wwm.io.core.layer2.PacketCodec.decode(PacketCodec.java:130)
        at com.wwm.io.core.layer2.PacketCodec.read(PacketCodec.java:78)
        at com.wwm.db.internal.server.txlog.TxLogPlayback.play(TxLogPlayback.java:66)
        at com.wwm.db.internal.server.txlog.TxLogPlayback.run(TxLogPlayback.java:120)

Ability to request classes (ClassLoaderInterface) was something we implemented for client to server, for a client to be able to request the class definition.

In the case of TxLogPlayback, there are 2 scenarios. Playing tx log from disk, and playing txlog from master to slave.

I think I'm right in saying that data should already have been pushed in Txlog stream before the class is used, so a failure in this scenario would be where the class was visible to the server classloader and now isn't.

(which is the very common scenario new users are likely to encounter when a tx log is written to disk and they restart the server ahving modified their app).

I think I'm going to soften what happens here by ignoring transactions involving class not found exception. The same should apply to reading pages involving those classes, but that, I think won't happen until someone asks for that class.

nealeu avatar May 06 '11 16:05 nealeu

This has been sorted out missing classes when loading stores, but needs a tests scenario creating for TxLogPlayback

nealeu avatar May 15 '11 19:05 nealeu