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

fix: Issue preventing DB from restarting with no records #437

Merged
merged 1 commit into from
May 13, 2022

Conversation

jsimnz
Copy link
Member

@jsimnz jsimnz commented May 12, 2022

Fixes #386

Simple fix. GetAllDocKeys returns a channel that will return results, but the same func also discards the transaction in a defer statement, which gets called after the return of the channel.

Moved the transaction discard into the cleanup routine of the subprocedure that handles the original channel cleanup.

@jsimnz jsimnz added bug Something isn't working area/collections Related to the collections system action/no-benchmark Skips the action that runs the benchmark. labels May 12, 2022
@jsimnz jsimnz added this to the DefraDB v0.3 milestone May 12, 2022
@codecov
Copy link

codecov bot commented May 12, 2022

Codecov Report

Merging #437 (f27efcb) into develop (896602a) will increase coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #437   +/-   ##
========================================
  Coverage    65.66%   65.67%           
========================================
  Files           80       80           
  Lines         9481     9480    -1     
========================================
  Hits          6226     6226           
+ Misses        2624     2623    -1     
  Partials       631      631           
Impacted Files Coverage Δ
db/collection.go 56.17% <0.00%> (+0.09%) ⬆️

@jsimnz jsimnz self-assigned this May 12, 2022
@jsimnz jsimnz requested a review from shahzadlone May 12, 2022 21:19
Copy link
Member

@shahzadlone shahzadlone left a comment

Choose a reason for hiding this comment

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

LGTM ✅ Can confirm this fixes it! Thanks for catching this 😄

Copy link
Contributor

@orpheuslummis orpheuslummis left a comment

Choose a reason for hiding this comment

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

LGTM

@jsimnz jsimnz requested a review from AndrewSisley May 13, 2022 17:21
@jsimnz jsimnz merged commit 0a12838 into develop May 13, 2022
@jsimnz jsimnz deleted the jsimnz/fix/I386-cannot-restart-db branch May 13, 2022 18:18
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/no-benchmark Skips the action that runs the benchmark. area/collections Related to the collections system bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Can not restart database after termination
4 participants