Page MenuHomeIn-Portal Phabricator

INP-1572 - Change semaphores to allow concurrent editing of different DB records
ClosedPublic

Authored by alex on Jul 18 2016, 4:14 AM.

Details

Test Plan
NOTE: Repeat test plan below in 5.2.x clean install and in 5.1.x clean install upgraded to 5.2.x.

Preparations

  1. open 2 windows in Firefox: normal and private browsing one
  2. in both windows:
    • login to Admin Console (will be 2 different sessions)
    • go to User ManagementUsers section
  3. enable debug all pages setting in debugger toolbar in normal browser window
  4. in IDE (PhpStorm):
    • open settings page
    • change Max. simultaneous connections setting to 2 in the Languages & FrameworksPHPDebug setting group
    • save changes
    • open /core/kernel/utility/temp_handler.php file
    • place breakpoint at $ids = $this->DoCopyTempToOriginal($this->Tables, null, $master_ids); line in the kTempTablesHandler::SaveEdit method
  5. in private browsing window:
    • create user with user_p1 username
    • create user with user_p2 username

Part 1 (adding + editing doesn't collide)

  1. in normal window:
    • create user with user_ae1 username
    • confirm, that PhpStorm's debugger kicked in and code is paused at above created breakpoint
  2. in private browsing window
    • double click on user_p1 user record to begin editing process
    • change some fields (but not username)
    • press save
    • confirm, that made changes were saved in live table
    • confirm, that saving process took no longer then 5 seconds
  3. in normal window:
    • continue script execution
    • confirm, that user_ae1 user was created

Part 2 (adding + adding doesn't collide)

  1. in normal window:
    • create user with user_aa1 username
    • confirm, that PhpStorm's debugger kicked in and code is paused at above created breakpoint
  2. in private browsing window
    • create user with user_aa2 username
    • confirm, that creation process took no longer then 5 seconds
    • confirm, that user_aa2 user was created
  3. in normal window:
    • continue script execution
    • confirm, that user_aa1 user was created

Part 3 (same record editing does collide)

  1. in normal window:
    • double click on user_p1 user record to begin editing process
    • confirm, that PhpStorm's debugger kicked in and code is paused at above created breakpoint
  2. in private browsing window
    • select both user_p1 and user_p2 in users grid
    • click on Edit button on toolbar
    • change some fields (but not username)
    • press save
    • confirm, that after 30 seconds delay an alert was shown with an error message
    • confirm, that after pressing OK button (name might be OS-specific) in that alert the changes made to user record are still shown in editing window
  3. in normal window:
    • continue script execution
  4. in private browsing window
    • press Save button on toolbar
    • confirm, that creation process took no longer then 5 seconds
    • confirm, that changes made to user_p2 and user_p2 are shown in grid

Part 4 (different record editing doesn't collide)

  1. in normal window:
    • double click on user_p1 user record to begin editing process
    • confirm, that PhpStorm's debugger kicked in and code is paused at above created breakpoint
  2. in private browsing window
    • double click on user_p2 user record to begin editing process
      • change some fields (but not username)
    • press save
    • confirm, that creation process took no longer then 5 seconds
    • confirm, that changes made are shown in grid
  3. in normal window:
    • continue script execution

Part 5 (different unit record editing doesn't collide)

  1. in normal window:
    • double click on user_p1 user record to begin editing process
    • confirm, that PhpStorm's debugger kicked in and code is paused at above created breakpoint
  2. in private browsing window
    • go to Website & ContentLabels & Phrases section
    • locate phrase, which ID matches ID of user_p1 user and open it for editing
    • change it's translation
    • press save
    • confirm, that saving process took no longer then 5 seconds
    • confirm, that changes made are shown in grid
  3. in normal window:
    • continue script execution

Diff Detail

Repository
rINP In-Portal
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

alex updated this revision to Diff 576.Jul 18 2016, 4:14 AM
alex retitled this revision from to INP-1572 - Change semaphores to allow concurrent editing of different DB records.
alex updated this object.
alex edited the test plan for this revision. (Show Details)
alex added 1 JIRA issue(s): INP-1572.
alex edited the test plan for this revision. (Show Details)Jul 18 2016, 4:14 AM
alex edited edge metadata.
alex added a project: Restricted Project.
erik accepted this revision.Jul 19 2016, 6:24 AM
erik edited edge metadata.
This revision is now accepted and ready to land.Jul 19 2016, 6:24 AM
This revision was automatically updated to reflect the committed changes.
alex added inline comments.Dec 16 2019, 7:42 AM
branches/5.2.x/core/install/upgrades.sql
2937

Discovered bug (after release), that "MainIDs" column during In-Portal 5.2.2-B1 upgrade is created as "INT" instead of "TEXT".