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

Reset failed state #5175

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Reset failed state #5175

wants to merge 2 commits into from

Conversation

greenape
Copy link
Member

@greenape greenape commented May 26, 2022

Closes #4009

I have:

  • Formatted any Python files with black
  • Brought the branch up to date with master
  • Added any relevant Github labels
  • Added tests for any new additions
  • Added or updated any relevant documentation
  • Added an Architectural Decision Record (ADR), if appropriate
  • Added an MPLv2 License Header if appropriate
  • Updated the Changelog

Description

Description of what this PR does, and what it changes.


@greenape greenape added bug Something isn't working FlowMachine Issues related to FlowMachine labels May 26, 2022
Copy link
Contributor

@Thingus Thingus left a comment

Choose a reason for hiding this comment

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

I dunno of this is a valid concern, but there may be potential for a continual loop hang here; see comment line 901

exception=exc,
)
q_state_machine.raise_error()
raise exc
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a potential for hang here, if a query can reset from elsewhere? This thread throws Exception, some cache service sees it and tries again, this thrown Exception, ect....

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, something to be wary of - should have enough information to avoid that because we arrive in an explicit reset failed state.

try:
log = partial(log, table_name=self.fully_qualified_table_name)
except NotImplementedError:
pass # Not a storable by default table
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need a log here?

Copy link
Member Author

Choose a reason for hiding this comment

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

No harm in it for sure

with con.begin():
con.execute("DROP TABLE IF EXISTS {}".format(full_name))
q_state_machine.finish_resetting()
except Exception as exc:
Copy link
Member Author

Choose a reason for hiding this comment

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

This should probably be a BaseException to catch shutdown as well

@cypress
Copy link

cypress bot commented Jun 16, 2022



Test summary

43 0 0 0Flakiness 0


Run details

Project FlowAuth
Status Passed
Commit 0360181
Started Jun 16, 2022 9:03 AM
Ended Jun 16, 2022 9:17 AM
Duration 13:12 💡
OS Linux Debian - 10.5
Browser Electron 100

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@codecov
Copy link

codecov bot commented Jun 16, 2022

Codecov Report

Merging #5175 (0360181) into master (ccdb885) will decrease coverage by 0.03%.
The diff coverage is 91.66%.

@@            Coverage Diff             @@
##           master    #5175      +/-   ##
==========================================
- Coverage   93.93%   93.90%   -0.04%     
==========================================
  Files         276      276              
  Lines       10641    10652      +11     
  Branches     1280     1280              
==========================================
+ Hits         9996    10003       +7     
- Misses        517      521       +4     
  Partials      128      128              
Impacted Files Coverage Δ
flowmachine/flowmachine/core/query.py 94.84% <90.47%> (-1.09%) ⬇️
flowmachine/flowmachine/core/query_state.py 100.00% <100.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working FlowMachine Issues related to FlowMachine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache cleanup may leave queries in resetting state
2 participants