Opened 10 years ago

Closed 7 years ago

#15893 closed defect (patchwelcome)

Tree: rearchitect DnD support to avoid race conditions

Reported by: bill Owned by: bill
Priority: low Milestone: 1.13
Component: Dijit Version: 1.8.0
Keywords: Cc:
Blocked By: Blocking:


Currently Tree handles DnD via the circuitous route of

  1. dndSource makes modifications to store
  2. store notifies Tree that data has been deleted
  3. store notifies tree that data has been added
  4. Tree infers that there was a DnD operation, and moves the dragged subtree(s).

This is good because DnD on one machine can be reflected on another machine (assuming a good client/server store with proper notification of changes via comet), and it also supports a theoretical application where two trees are connected to the same store.

However, it has timing issues. Since the delete processing is delayed, if a delete is followed immediately by an add of the same node (or a subnode of the same node), bad things could happen. See for an example.

Probably, it makes sense for Tree to handle a DnD operation directly (supporting the concept of moving a subtree or subtrees), and then make the Tree code idempotent so it can just ignore the subsequent data store notifications.

Change History (3)

comment:1 Changed 10 years ago by Peter Jekel

See additional comment 9 in ticket #15858 and proposed fix.

comment:2 Changed 9 years ago by bill

Milestone: tbdfuture
Priority: undecidedlow

comment:3 Changed 7 years ago by dylan

Milestone: future1.12
Resolution: patchwelcome
Status: newclosed

Given that no one has shown interest in creating a patch in the past 3+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.