CouldNotLockPageException after 1 minute in case of posting from multiple threads.
Example test project
Your quickstart is posting messages to the pages at a rate of 500 events per second (which crashes the chrome process btw). Processing of a single event takes a little over 2ms on my machine, which is quite fast, but not fast enough to keep up with the endless stream of events, causing starvation on some threads. This is triggering the page lock exceptions.
Also on a much lower rate the application will crash. Just try it. You sometimes have to wait a bit longer, but in the end it will crash. It's just not stable enough for a production environment.
Critical is only for wicket-core functionality that blocks normal processing. Unsupported, experimental features never get a priority of anything higher than minor.
Thanks. I'll keep that in mind next time.
Further testing shows that PageAccessSynchronizer is not always able to lock a page when multiple threads acquire and release locks at a very high rate. This is what happens:
thread B putIfAbsent(1) -> null
thread A putIfAbsent(2) -> 1
thread B remove(1)
thread B notifyAll(1)
thread A wait(1).......
The releasing issue is fixed by adding an additional check before waiting for the lock to be released.