-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global timeouts using before query hooks #341
Conversation
{ | ||
if ($this->getDatabase()->getAdapter()->getSupportForTimeouts()) { | ||
static::getDatabase()->createCollection('global-timeouts'); | ||
$this->assertEquals(true, static::getDatabase()->createAttribute('global-timeouts', 'longtext', Database::VAR_STRING, 100000000, true)); | ||
|
||
for ($i = 0 ; $i <= 5 ; $i++) { | ||
for ($i = 0 ; $i <= 20 ; $i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to change this otherwise tests were failing, not sure if it's local to me, seems to be a performance win so not worried.
Context: loop iterations determine how many huge documents to insert to force a timeout when querying them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can make the text in the file little longer, maybe will help to get a timeout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny comment
What's Changed
Allow using instance level query hooks to set timeout per database event (or all)
Test Plan
Existing tests, updated timeout test