Skip to content

Conversation

@abnegate
Copy link
Member

What's Changed

Allow using instance level query hooks to set timeout per database event (or all)

Test Plan

Existing tests, updated timeout test

@abnegate abnegate requested a review from eldadfux October 19, 2023 01:06
$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++) {
Copy link
Member Author

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

Copy link
Contributor

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

Copy link
Contributor

@christyjacob4 christyjacob4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny comment

@abnegate abnegate merged commit 591cadb into main Oct 19, 2023
@abnegate abnegate deleted the feat-global-timeouts branch November 23, 2023 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants