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

Simultaneous first-time reading of the same conversation by the same user has race conditions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • Server
    • None

    Description

      <b>What steps will reproduce the problem?</b>
      [Theoretical, never done in practice]
      1. Create a wave with several blips, add participant X.
      2. User X logs in to two clients, then goes offline (e.g. disconnect network).
      3. X opens the wave on both clients, reads some blips in one client, reads other blips in the other client.
      4. X goes back online on both clients.

      <b>What is the expected output? What do you see instead?</b>

      Expected output (ideally) is that the reading actions merge concurrently. e.g. any blip read on either client becomes read on both clients. Each client should display this resolution live, without either client needing to re-open or refresh. Additionally, re-open or refresh should be a no-op after this resolution: all read-state should be the same.

      Instead, theoretically, both clients will have no change on reconnection, but when re-opening that wave, the reading actions from only one of the two clients will be preserved.

      The bug is simple: the embedding of WaveletReadState objects in the m/read documetn does not resolve multiple <wavelet> elements with the same id.

      A fix for this must preserve the cleanup-on-write property. i.e., active resolution of the XML, by merging the data in the XML as soon as duplicates are observed, is not acceptable. This makes a fix not completely trivial.

      Since the data types embedded inside each per-wavelet read-state object element are monotonic and superimposable, one solution is for WaveletBasedSupplement to collect all WaveletReadState objects that exist for the same id, and wrap them in a composite WaveletReadState object, that distributes all queries over each component read state object. On any write subsequent action, for any wavelet with multiple <wavelet> elements, a new <wavelet> object can be added that contains the sum information of all the others, and then all the original <wavelet> elements can be deleted.

      Doing this completely correctly, with respect to composition, intermediate transitive states, left-to-right broadcast of document events, and a sensible resolution of multiple WaveletReadState objects, may or may not be difficult.


      Issue imported from http://code.google.com/p/wave-protocol/issues/detail?id=174

      Label: Type-Defect
      Label: Priority-Medium
      Stars: 1
      State: open
      Status: New

      Attachments

        Activity

          People

            Unassigned Unassigned
            Anonymous Anonymous
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: