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

Panic reduction #615

Closed
11 tasks done
orpheuslummis opened this issue Jul 9, 2022 · 2 comments · Fixed by #732 or #881
Closed
11 tasks done

Panic reduction #615

orpheuslummis opened this issue Jul 9, 2022 · 2 comments · Fixed by #732 or #881
Assignees
Labels
bug Something isn't working

Comments

@orpheuslummis
Copy link
Contributor

orpheuslummis commented Jul 9, 2022

A tracking issue for minimizing panic.

The risk with panic() is that it leads to runtime crash.

Acceptable kinds of panic:

  • In initialization as they are ran as part of process startup (AFAIK) and not expected to induce runtime crashes.
  • When intentional, internal, and handled by recover()
  • Crash intentionally when facing some kinds of "exceptional situations"

Paths forward:

  • convert to error
  • avoid situation

Here are the current points calling panic() (as of commit 16084c8 ...), excluding tests.
I'm marking each as a task that can be marked off with a decision/change.

@orpheuslummis orpheuslummis added the bug Something isn't working label Jul 9, 2022
@jsimnz jsimnz added this to the DefraDB v0.3.1 milestone Jul 19, 2022
@AndrewSisley AndrewSisley self-assigned this Jul 19, 2022
@AndrewSisley
Copy link
Contributor

Defering panics in client/document as the correct behaviour requires a public function signature change (to return the error), and IMO that is not suitable for a patch release (v0.x.y or not).

@AndrewSisley AndrewSisley linked a pull request Aug 8, 2022 that will close this issue
1 task
@AndrewSisley AndrewSisley modified the milestones: DefraDB v0.3.1, DefraDB v0.4 Aug 8, 2022
@AndrewSisley AndrewSisley reopened this Aug 8, 2022
@AndrewSisley
Copy link
Contributor

Moved to v0.4.0 as remaining items require pub signature changes

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