@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Conpherence - improve reliability of message delivery

Summary:
Ref T7755. T7755#107290 reproduced for me reliably and now it does not. Cleaned up the logic around in flight updates as it was not correct.

Not sure this is enough to close T7755, but maybe?

Test Plan: T7755#107290 no longer reproduces!

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6713, T7755

Differential Revision: https://secure.phabricator.com/D12755

+24 -18
+13 -13
resources/celerity/map.php
··· 8 8 return array( 9 9 'names' => array( 10 10 'core.pkg.css' => 'ca3f6a60', 11 - 'core.pkg.js' => 'ff529dc7', 11 + 'core.pkg.js' => 'f6b48b53', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => 'bb338e4b', 14 14 'differential.pkg.js' => '895b8d62', ··· 346 346 'rsrc/js/application/aphlict/behavior-aphlict-status.js' => 'ea681761', 347 347 'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18', 348 348 'rsrc/js/application/config/behavior-reorder-fields.js' => '14a827de', 349 - 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => '6709c934', 349 + 'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => 'f8dace3b', 350 350 'rsrc/js/application/conpherence/behavior-drag-and-drop-photo.js' => 'cf86d16a', 351 351 'rsrc/js/application/conpherence/behavior-durable-column.js' => '657c2b50', 352 352 'rsrc/js/application/conpherence/behavior-menu.js' => '804b0773', ··· 513 513 'conpherence-menu-css' => 'f389e048', 514 514 'conpherence-message-pane-css' => '3150e2a2', 515 515 'conpherence-notification-css' => 'd208f806', 516 - 'conpherence-thread-manager' => '6709c934', 516 + 'conpherence-thread-manager' => 'f8dace3b', 517 517 'conpherence-transaction-css' => '25138b7f', 518 518 'conpherence-update-css' => '1099a660', 519 519 'conpherence-widget-pane-css' => '2af42ebe', ··· 1288 1288 'phabricator-keyboard-shortcut', 1289 1289 'conpherence-thread-manager', 1290 1290 ), 1291 - '6709c934' => array( 1292 - 'javelin-dom', 1293 - 'javelin-util', 1294 - 'javelin-stratcom', 1295 - 'javelin-install', 1296 - 'javelin-workflow', 1297 - 'javelin-router', 1298 - 'javelin-behavior-device', 1299 - 'javelin-vector', 1300 - ), 1301 1291 '6882e80a' => array( 1302 1292 'javelin-dom', 1303 1293 ), ··· 1996 1986 'javelin-mask', 1997 1987 'javelin-util', 1998 1988 'phabricator-busy', 1989 + ), 1990 + 'f8dace3b' => array( 1991 + 'javelin-dom', 1992 + 'javelin-util', 1993 + 'javelin-stratcom', 1994 + 'javelin-install', 1995 + 'javelin-workflow', 1996 + 'javelin-router', 1997 + 'javelin-behavior-device', 1998 + 'javelin-vector', 1999 1999 ), 2000 2000 'f9539603' => array( 2001 2001 'javelin-behavior',
+11 -5
webroot/rsrc/js/application/conpherence/ConpherenceThreadManager.js
··· 164 164 // Message event for something we already know about. 165 165 return; 166 166 } 167 - // If we're currently updating, wait for the update to complete. 167 + 168 168 // If this notification tells us about a message which is newer than 169 - // the newest one we know to exist, keep track of it so we can 170 - // update once the in-flight update finishes. 169 + // the newest one we know to exist, update our latest knownID so we 170 + // can properly update later. 171 171 if (this._updating && 172 172 this._updating.threadPHID == this._loadedThreadPHID) { 173 173 if (message.messageID > this._updating.knownID) { 174 174 this._updating.knownID = message.messageID; 175 - return; 175 + // We're currently updating, so wait for the update to complete. 176 + // this.syncWorkflow has us covered in this case. 177 + if (this._updating.active) { 178 + return; 179 + } 176 180 } 177 181 } 178 182 ··· 226 230 syncWorkflow: function(workflow, stage) { 227 231 this._updating = { 228 232 threadPHID: this._loadedThreadPHID, 229 - knownID: this._latestTransactionID 233 + knownID: this._latestTransactionID, 234 + active: true 230 235 }; 231 236 workflow.listen(stage, JX.bind(this, function() { 232 237 // TODO - do we need to handle if we switch threads somehow? ··· 235 240 if (need_sync) { 236 241 return this._updateThread(); 237 242 } 243 + this._updating.active = false; 238 244 })); 239 245 workflow.start(); 240 246 },