-
Notifications
You must be signed in to change notification settings - Fork 171
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
Specify Flexible Event behavior other than summary windows #1109
Conversation
Can you help me understand how this will work with full flex, especially because in full flex each "trigger" that we sort by priority may not consume any budget? Regarding the spec without
with these reports
We would prioritize trigger data 0 over 1 right? This feels a bit wrong to me, especially if we have some trigger_data that is generally lower priority but with a short window (like a page view conversion). |
I was under the perhaps incorrect assumption that in Full Flex the effective sort key for trigger-application order is the report window ascending, then priority descending, then trigger time ascending. That said, the Flexible Event explainer is quite vague here (#900).
With this PR, yes, trigger data 0 would be prioritized. However, consider the same trigger specs with the following triggers without this PR: {"trigger_data": "1", "priority": "100"} // trigger time = +1s
{"trigger_data": "0", "priority": "200"} // trigger time = +2s The first trigger's scheduled report time would be Maybe neither approach is ideal? I certainly want this PR to be compatible with Full Flex even without |
Updated this change to only change how eligibility for replacement is determined, not the prioritization logic applied to those eligible, which should give the behavior desired in #1109 (comment) rather than #1109 (comment). |
Instead of comparing the new report's report time to the existing ones' to determine the existing ones' eligibility to be replaced, we consider existing ones eligible if their report time hasn't been reached yet.
It is my understanding that the report-time equality check in the previous version of this algorithm was included with the same intentions.
This has no effect on implementations whose clocks are well-behaved, as report times for a given source will be non-decreasing because trigger times are also non-decreasing, but makes the algorithm more compatible with the proposed Full Flex behavior.
Preview | Diff