Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Calculate stream_ordering_month_ago correctly on workers #2923

Merged
merged 3 commits into from Mar 1, 2018

Conversation

erikjohnston
Copy link
Member

I checked the logs and it doesn't look like it takes long at all to calculate these so I don't think it matters if we start calculating these on workers too.

def __init__(self, db_conn, hs):
super(EventPushActionsWorkerStore, self).__init__(db_conn, hs)

# These get correctly ste by _find_stream_orderings_for_times_txn
Copy link
Member

Choose a reason for hiding this comment

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

ste


# These get correctly ste by _find_stream_orderings_for_times_txn
self.stream_ordering_month_ago = 0
self.stream_ordering_day_ago = 0
Copy link
Member

Choose a reason for hiding this comment

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

we have code here which appears to expect this to be initialised to None (though I see no evidence of it being intialised at all, so perhaps it was just broken before)

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, may as well set it to None. I think before we didn't call _find_stream_orderings_for_times_txn on start up whereas now we do, so that code won't be hit currently.

@richvdh richvdh assigned erikjohnston and unassigned richvdh Mar 1, 2018
@erikjohnston erikjohnston assigned richvdh and unassigned erikjohnston Mar 1, 2018
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

lgtm

@richvdh richvdh assigned erikjohnston and unassigned richvdh Mar 1, 2018
@erikjohnston erikjohnston merged commit 22518e2 into develop Mar 1, 2018
@erikjohnston erikjohnston deleted the erikj/stream_ago_worker branch March 5, 2018 15:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants