Skip to content
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

Limit max execution time of archiving queries to 2 hours by default #16971

Merged
merged 7 commits into from Dec 31, 2020

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Dec 17, 2020

Description:

This will actually only catch those queries using the ArchivingDbAdapter, but guess that should be most of them.

fixes #15241

Review

  • Functional review done
  • Usability review done (is anything maybe unclear or think about anything that would cause people to reach out to support)
  • Security review done see checklist
  • Code review done
  • Tests were added if useful/possible
  • Reviewed for breaking changes
  • Developer changelog updated if needed
  • Documentation added if needed
  • Existing documentation updated if needed

@sgiehl sgiehl added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Dec 17, 2020
@sgiehl sgiehl added this to the 4.1.0 milestone Dec 17, 2020
public function __construct($wrapped, Lock $archivingLock = null, LoggerInterface $logger = null)
{
$this->wrapped = $wrapped;
$this->archivingLock = $archivingLock;
$this->logger = $logger;
$this->maxExecutionTime = Config::getInstance()->General['archiving_query_max_execution_time'];
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to check for malformed input at all?

Copy link
Member Author

Choose a reason for hiding this comment

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

Don't think we are doing that for other config values that much. But will add a casting to float to ensure it's at least a number.

@mattab mattab modified the milestones: 4.1.0, 4.2.0 Dec 21, 2020
@diosmosis diosmosis merged commit 94dc631 into 4.x-dev Dec 31, 2020
@diosmosis diosmosis deleted the limitarchivingquery branch December 31, 2020 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Limit max execution time for all SQL queries executed during report archiving
3 participants