Page MenuHomeIn-Portal Phabricator

INP-1890 - Force "\kApplication::NextResourceId" method to use master database connection
Needs ReviewPublic

Authored by alex on Tue, Dec 10, 7:22 AM.

Details

Reviewers
erik
Test Plan

Preparations

  1. in IDE:
    • open the /index.php for editing
    • replace $application->Run(); line with echo $application->NextResourceId(); line
    • save changes
    • open the /system/config.php file for editing
    • append this to end of the file:
$_CONFIG['Databases'] = array(
    array(
	'DBHost' => $_CONFIG['Database']['DBHost'],
	'DBUser' => $_CONFIG['Database']['DBUser'],
	'DBUserPassword' => $_CONFIG['Database']['DBUserPassword'],
	'DBLoad' => 1,
	'DBMaxLag' => 15,
    ),
);
  • save changes

Part 1

  1. don't apply the patch
  2. open /index.php in the browser
  3. confirm, that it hangs (page keeps loading) because lock was set in slave database, but data is changed in master database (they both reference the same database)
  4. apply the patch
  5. open /index.php in the browser
  6. confirm, that page has loaded and next resource id is displayed on the page
  7. open /index.php in the browser
  8. confirm, that page has loaded and next resource id is displayed on the page (not the same as previous time)

Diff Detail

Repository
rINP In-Portal
Branch
/in-portal/branches/5.2.x
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 1350
Build 1350: arc lint + arc unit

Event Timeline

alex created this revision.Tue, Dec 10, 7:22 AM
alex requested review of this revision.Tue, Dec 10, 7:22 AM
alex edited the test plan for this revision. (Show Details)Tue, Dec 10, 7:45 AM
Harbormaster completed remote builds in B1350: Diff 1299.
Harbormaster completed remote builds in B1350: Diff 1299.