Page MenuHomeIn-Portal Phabricator

INP-1569 - Create System Log record, when stale semaphore is discovered or hit
ClosedPublic

Authored by alex on Feb 3 2023, 10:57 AM.

Details

Test Plan
NOTE: Test on both "clean install" and "upgraded website".

Test plan

  1. in the Admin Console
    1. if the Semaphores database table isn't empty, then clear it
    2. go to the ConfigurationWebsiteAdvanced section
    3. confirm, that the Delete Stuck Semaphores after system setting is present
    4. go to ConfigurationWebsiteStop Words section
    5. open any record for editing
    6. save it
    7. confirm, that the Semaphores table is still empty
  2. in IDE:
    1. open \kTempTablesHandler::SaveEdit method for editing
    2. comment-out the code, that deletes a semaphore (between $ids = $this->DoCopyTempToOriginal($this->Tables, null, $master_ids); and return $ids;
    3. save changes
  3. in the Admin Console
    1. go to ConfigurationWebsiteStop Words section
    2. open any record for editing
    3. save it
    4. confirm, that the Semaphores table has 1 record now related to the edited record
    5. go to the ConfigurationWebsiteScheduled Tasks section
    6. run the delete_stuck_semaphores scheduled task
    7. confirm, that above added semaphore record is still present in the Semaphores table
    8. go to ConfigurationWebsiteStop Words section
    9. open same record for editing and try to save it
    10. confirm, that:
      • after a delay of 30 seconds you'll see an alert explaining that saving has failed
      • the record was added to the Logs & ReportsSystem Logs section about a parallel editing attempt
    11. subtract 305 from the Timestamp column value of the above-added semaphore record (+save changes to db)
    12. run the delete_stuck_semaphores scheduled task
    13. confirm, that:
      • the above-added semaphore record is removed from the Semaphores table
      • the record was added to the Logs & ReportsSystem Logs section about a detected stuck semaphore

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 created this revision.Feb 3 2023, 10:57 AM
alex requested review of this revision.Feb 3 2023, 10:57 AM
alex planned changes to this revision.Feb 3 2023, 11:00 AM
alex edited the test plan for this revision. (Show Details)
alex edited the test plan for this revision. (Show Details)Feb 6 2023, 6:44 AM
alex updated this revision to Diff 1131.Feb 6 2023, 6:46 AM

Changed terminology

alex updated this revision to Diff 1132.Feb 6 2023, 8:16 AM

Fixed outdated phrase translation.

erik accepted this revision.Feb 7 2023, 5:03 AM
This revision is now accepted and ready to land.Feb 7 2023, 5:03 AM
alex updated this revision to Diff 1152.May 3 2023, 6:30 AM

Ignore arguments in backtrace saved into the Semaphores table to radically reduce INSERT query size.

This revision was landed with ongoing or failed builds.Nov 21 2023, 3:15 AM
This revision was automatically updated to reflect the committed changes.