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

perf: Embed WindowCheck in TimeSeriesFilter. #6081

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

cpwright
Copy link
Contributor

Fixes #6062.

Copy link
Member

@rcaudy rcaudy left a comment

Choose a reason for hiding this comment

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

We addressed many concerns inline during the PR.
TestClock should be converged with existing.
TimeSeriesFilter does not need a MergedListener, just a plain old ListenerImpl.

} else if (refilterUnmatchedRequested) {
// things that are added or removed are already reflected in source.getRowSet
final WritableRowSet unmatchedRows = source.getRowSet().minus(getRowSet());
// we must check rows that have been modified instead of just preserving them
if (upstream != null) {
unmatchedRows.insert(upstream.modified());
}
if (refilterRequestedRowset != null) {
unmatchedRows.insert(refilterRequestedRowset);
Copy link
Member

Choose a reason for hiding this comment

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

We copy() unmatchedRows below, and I think that is redundant. As-is, we're still never closing it.


// Note that removed must be propagated to listeners in pre-shift keyspace.
if (upstream != null) {
upstream.shifted().unapply(postShiftRemovals);
}
update.removed.writableCast().insert(postShiftRemovals);
update.removed = postShiftRemovals;
Copy link
Member

Choose a reason for hiding this comment

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

I think you should close removed, or just never assign it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There was a comment related to this in the other part of the code where removed is created originally. Because the shift aware updates support added + removed, we need to include the original removed from the update, plus our new removals to account for rows that are added/removed as a modify w/o lighting up the entire MCS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TimeSeriesFilter should rewritten in terms of WindowCheck
2 participants