Forum skips posts, recovering requires F5/full page refresh

This sounds like a race condition… which would be insanely hard to repro predictably.

I’ve added a delay to Post#publish_change_to_clients! to simulate a spike in network latency that affects posts made by user A. Setup: user A and B are both at the bottom of the same topic. User A posts. Within the artificial delay, user B posts. After the message bus has caught up, the posts in user B’s post stream are out of order and a loading indicator remains visible permanently:

(The first post has post numer 5, the second one has post number 6.)

Additionally, this error message pops up in the JS console: Error: Assertion Failed: Attempted to register a view with an id already in use: post-cloak-5. Backtrace from the server logs:

EmberError@http://majestix:3000/assets/development/ember.js?body=1:13741:17
Ember.assert@http://majestix:3000/assets/development/ember.js?body=1:3903:15
.enter@http://majestix:3000/assets/development/ember.js?body=1:41726:1
View<._transitionTo@http://majestix:3000/assets/development/ember.js?body=1:43714:35
Renderer.prototype.didInsertElement@http://majestix:3000/assets/development/ember.js?body=1:40038:9
Renderer_renderTree@http://majestix:3000/assets/development/ember.js?body=1:10129:11
.ensureChildrenAreInDOM@http://majestix:3000/assets/development/ember.js?body=1:41304:13
ContainerView<._ensureChildrenAreInDOM@http://majestix:3000/assets/development/ember.js?body=1:41267:9
Queue.prototype.invoke@http://majestix:3000/assets/development/ember.js?body=1:849:11
Queue.prototype.flush@http://majestix:3000/assets/development/ember.js?body=1:914:13
DeferredActionQueues.prototype.flush@http://majestix:3000/assets/development/ember.js?body=1:719:13
Backburner.prototype.end@http://majestix:3000/assets/development/ember.js?body=1:144:11
Backburner.prototype.run@http://majestix:3000/assets/development/ember.js?body=1:199:15
run@http://majestix:3000/assets/development/ember.js?body=1:17897:14
Discourse.Ajax<.ajax/performAjax/args.success@http://majestix:3000/assets/discourse/mixins/ajax.js?body=1:66:9
jQuery.Callbacks/fire@http://majestix:3000/assets/development/jquery-2.1.1.js?body=1:3074:10
jQuery.Callbacks/self.fireWith@http://majestix:3000/assets/development/jquery-2.1.1.js?body=1:3186:7
done@http://majestix:3000/assets/development/jquery-2.1.1.js?body=1:8252:5
.send/callback/<@http://majestix:3000/assets/development/jquery-2.1.1.js?body=1:8599:1

The post stream clearly does not handle out-of-order updates well. I’ve tested under development conditions, the net effect might be different in production mode, if the out-of-order post lags more than one post behind or if all reordered posts arrived through the message bus instead of one being generated locally.

4 „Gefällt mir“