Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-31714

In cluster environment, MB message count does not increment correctly

    Details

      Description

      What may be happening is that there's two or more people posting in the same thread in different cluster nodes. Say the first one to post increments the count but the cache isn't flushed on the second node so now that the second person post a new post it increments the original count and not the updated count. BaBoom! We have inconsistency with the count and actual number of posts!

      This issue is a bit tricky to reproduce, as it requires a cluster and quick clicking, but here we go:

      Steps to Reproduce
      1. Setup a basic cluster:
      A. Shared Database
      B. Clustered Ehcache
      C. Portal-ext.properties

      jdbc.default.driverClassName=com.mysql.jdbc.Driver
      jdbc.default.url=jdbc:mysql://IP_ADDRESS/DB_NAME?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
      jdbc.default.username=root
      jdbc.default.password=test

      cluster.link.enabled=true
      lucene.replicate.write=true
      web.server.display.node=true

      2. In one node, go to the Control Panel -> MessageBoards, then create a new Thread.
      3. In both nodes, go to the same Thread, and Click on Reply -> prepare a response BUT DON'T CLICK ON PUBLISH YET
      4. Here's the tricky part:
      Now that you have prepared the responses in both nodes, VERY QUICKLY click Publish in both nodes as fast as you can!
      5. Repeat steps 3 and 4 a few times.
      If you did it correctly, then you'll see that the number of posts is greater than the count don't match up.

        Attachments

        1. missing-1post.jpg
          missing-1post.jpg
          46 kB
        2. posts.jpg
          posts.jpg
          79 kB

          Issue Links

            Activity

              People

              Assignee:
              pani.gui Pani Gui (Inactive)
              Reporter:
              gabriel.lee Gabriel Lee
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                7 years, 7 weeks, 3 days ago

                  Packages

                  Version Package
                  6.0.X EE
                  6.1.30 EE GA3
                  6.2.0 CE M4