Uploaded image for project: 'Wave'
  1. Wave
  2. WAVE-393

Delta File Storage Crashes WIAB

    XMLWordPrintableJSON

Details

    • Bug
    • Status: In Progress
    • Critical
    • Resolution: Unresolved
    • None
    • None
    • Server
    • None

    Description

      I've been trying to run a WIAB server using delta_store_type = file so as to persist waves on the filesystem. However, this causes the following error to be thrown whenever a wave is subject to active, heavy concurrent edition by at least two users:

      com.google.gxp.compiler.io.RuntimeIOException: java.io.IOException: Delta header invalid
      at org.waveprotocol.box.server.waveserver.DeltaStoreBasedWaveletState.getTransformedDeltaHistory(DeltaStoreBasedWaveletState.java:374)
      at org.waveprotocol.box.server.waveserver.WaveletContainerImpl.transformSubmittedDelta(WaveletContainerImpl.java:374)
      at org.waveprotocol.box.server.waveserver.WaveletContainerImpl.maybeTransformSubmittedDelta(WaveletContainerImpl.java:359)
      at org.waveprotocol.box.server.waveserver.LocalWaveletContainerImpl.transformAndApplyLocalDelta(LocalWaveletContainerImpl.java:140)
      at org.waveprotocol.box.server.waveserver.LocalWaveletContainerImpl.submitRequest(LocalWaveletContainerImpl.java:98)
      at org.waveprotocol.box.server.waveserver.WaveServerImpl.submitDelta(WaveServerImpl.java:553)
      at org.waveprotocol.box.server.waveserver.WaveServerImpl.submitRequest(WaveServerImpl.java:355)
      at org.waveprotocol.box.server.frontend.ClientFrontendImpl.submitRequest(ClientFrontendImpl.java:194)
      at org.waveprotocol.box.server.frontend.WaveClientRpcImpl.submit(WaveClientRpcImpl.java:166)
      at org.waveprotocol.box.common.comms.WaveClientRpc$ProtocolWaveClientRpc$1.submit(WaveClientRpc.java:4478)
      at org.waveprotocol.box.common.comms.WaveClientRpc$ProtocolWaveClientRpc.callMethod(WaveClientRpc.java:4608)
      at org.waveprotocol.box.server.rpc.ServerRpcControllerImpl.run(ServerRpcControllerImpl.java:202)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      at java.lang.Thread.run(Thread.java:680)
      Caused by: java.io.IOException: Delta header invalid
      at org.waveprotocol.box.server.persistence.file.FileDeltaCollection.readDeltaHeader(FileDeltaCollection.java:451)
      at org.waveprotocol.box.server.persistence.file.FileDeltaCollection.readRecord(FileDeltaCollection.java:406)
      at org.waveprotocol.box.server.persistence.file.FileDeltaCollection.getDelta(FileDeltaCollection.java:189)
      at org.waveprotocol.box.server.waveserver.DeltaStoreBasedWaveletState.getDelta(DeltaStoreBasedWaveletState.java:169)
      at org.waveprotocol.box.server.waveserver.DeltaStoreBasedWaveletState.readDeltasInRange(DeltaStoreBasedWaveletState.java:147)
      at org.waveprotocol.box.server.waveserver.DeltaStoreBasedWaveletState.getTransformedDeltaHistory(DeltaStoreBasedWaveletState.java:366)
      ... 14 more

      After a while trying to debug this I found it originates because, at some point, the server will try to read a past version of the wave from the persistence file using an erroneous or corrupted position in the file as an index. This occurs almost "randomly" halfway through the editing process, and can be easily reproduced by having two users opening and editing the same wave actively using the WIAB client.

      Attachments

        1. ScreenFlow.mp4
          7.31 MB
          John Darret Steward

        Issue Links

          Activity

            People

              yurize Yuri Zelikov
              john.darret.steward John Darret Steward
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: