Make PermaCrud.js disconnect() actually disconnect

Bug #1379824 reported by Dan Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
2.5
Fix Released
Undecided
Unassigned
2.6
Fix Released
Undecided
Unassigned

Bug Description

Evergreen - All recent versions (2.7 and earlier)

The disconnect() method in PermaCrud.js was meant to wrap the underlying session disconnect, but it never actually disconnected the session. This could lead to problems in long-living PermaCrud objects, as they may think they are still connected when they are not (the session remote_id is never cleared).

This problem is also the root of bug #1233350 (Cannot edit an authority record twice without reloading authorities).

Branch to follow immediately.

Revision history for this message
Dan Wells (dbw2) wrote :

Branch is here:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dbwells/lp1379824_fix_pcrud_disconnects

user/dbwells/lp1379824_fix_pcrud_disconnects

The easiest way to test this is with bug #1233350. That said, here is what the pattern is to trigger the bug:

- Create a JS PermaCrud object.
- Use that object to do an 'update' operation.
- Wait a short while for transaction to finish server-side, then use the same object to do a transaction-less action (e.g. 'retrieve').
-- The object will block permanently while waiting for the non-responsive (non-existent?) drone to respond.

Dan Wells (dbw2)
tags: added: pullrequest
Revision history for this message
Yamil (ysuarez) wrote :

I tested this commit in 2.7.0 and 2.6.2 using the concerto dataset.

Here is my signoff branch...

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/ysuarez/lp1379824_fix_pcrud_disconnects_signoff

Thanks for looking into it Dan (and Remington).

Revision history for this message
Ben Shum (bshum) wrote :

Pushed to master and backported to branches. Thanks Dan, Remington and Yamil.

Changed in evergreen:
status: New → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.