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

Add segment_last_edit_time option value for [General] process_new_segments_from INI config #8615

Merged
merged 3 commits into from Aug 21, 2015

Conversation

diosmosis
Copy link
Member

Add new option for [General] process_new_segments_from option, 'segment_last_edit_time'. New option sets beginning of segments archiving from last edit time (or created time if it is found). Includes tests.

Refs #8607

TODO:

  • Should test the whole core:archive manually once.

…nt_last_edit_time'. New option sets beginning of segments archiving from last edit time (or created time if it is found). Includes tests.
@diosmosis diosmosis added c: Performance For when we could improve the performance / speed of Matomo. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Needs Review PRs that need a code review labels Aug 21, 2015
@diosmosis diosmosis added this to the 2.15.0 milestone Aug 21, 2015
@diosmosis
Copy link
Member Author

CC @quba

$this->logger->debug("process_new_segments_from set to segment_last_edit_time, segment last edit time is {time}",
array('time' => $segmentLastEditedTime));

if ($segmentLastEditedTime === null
Copy link
Member

Choose a reason for hiding this comment

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

Maybe off topic but when we create a segment, do we set edited time = created time? This would avoid having to do this check and I think it's usually common to do this. But we'd need an update script then to fix missing values :(

Copy link
Member Author

Choose a reason for hiding this comment

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

I actually thought we did and was just being extra careful (didn't want to slow core:archive down if somehow the field was null (maybe due to a plugin)), but it turns out we don't initialize it to the created time... more strangeness in the world of Piwik core.

I don't think it's necessary to change this for 2.15, but it seems obvious to me that the last edit time should be initialized to the created time. If you agree, I'll create an issue for 3.0.

@tsteur
Copy link
Member

tsteur commented Aug 21, 2015

Looks good to me, added a comment but more like optional

@diosmosis
Copy link
Member Author

Manual tests went ok, will merge.

@tsteur If there are any other issues, feel free to bring them up, I can make changes after merging.

diosmosis added a commit that referenced this pull request Aug 21, 2015
Fixes #8607, add segment_last_edit_time option value for [General] process_new_segments_from INI config
@diosmosis diosmosis merged commit 1db8715 into master Aug 21, 2015
@diosmosis diosmosis deleted the 8607_last_edit_segment_archiving branch August 21, 2015 17:06
@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Oct 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Performance For when we could improve the performance / speed of Matomo. c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. 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.

None yet

3 participants