foam-framework / foam

Feature-Oriented Active Modeller
Apache License 2.0
786 stars 55 forks source link

U2 Browser: Race condition when immediately creating a new entry #495

Closed bshepherdson closed 8 years ago

bshepherdson commented 8 years ago
  1. Create a new entry.
  2. Enter text into an input field.
  3. Do not blur the field.
  4. Click the checkmark to save the new entry.

Observe that the new row in the list is blank, and then fills in. If your DAO persists, and you reload, you'll see that the value was never set in the persistent DAO.

Probably this can be solved by delaying the ObjectReplicator calling put() slightly.

adamvy-google commented 8 years ago

I thought that the ObjectReplicator was not used in the DAOCreateController.

The ObjectReplicator listener should probably be merged to 100ms or so, such that rapid object changes don't hammer the DAO.

But even if that fixes the problem, that feels like a hackish fix. Something not dependant upon timeouts would be more robust.