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

process_new_segments_from does not work correctly with lastN setting #10417

Open
quba opened this issue Aug 18, 2016 · 2 comments
Open

process_new_segments_from does not work correctly with lastN setting #10417

quba opened this issue Aug 18, 2016 · 2 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.

Comments

@quba
Copy link
Contributor

quba commented Aug 18, 2016

Especially this part:

lastN where N is an integer (eg "last10" to archive for 10 days before the segment creation date)

I've created a segment Browser == Safari. process_new_segments_from set to last16

What's the outcome? One year of data archived for this segment.

See below:
screenshot 2016-08-18 17 48 38

I'd expect to have only all periods that are fully included archived. E.g. with today's date and last16, it should archive last 16 days, last 2 weeks and skip monthly and yearly archiving as it makes no sense to trigger daily archiving nor archive month and year periods based on incomplete data.

Relates #7483

@mattab
Copy link
Member

mattab commented Aug 22, 2016

Thanks for the report @quba !

Could you paste the output from verbose core:archive run -vvv ? the script will log messages related to segment processing start date, these messages maybe would help see the problem. Btw the related code is here: https://github.com/piwik/piwik/blob/2.16.2/core/CronArchive/SegmentArchivingRequestUrlProvider.php#L68-L93 in case you can investigate

@quba
Copy link
Contributor Author

quba commented Aug 25, 2016

period=year&date=2016-08-02,2016-12-31

So, that's the reason it archives the whole current year. IMO it should skip bigger periods that are not fully included in that date range.

@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label Nov 11, 2016
@mattab mattab added this to the 3.0.0 milestone Nov 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants