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

Move db transactions to context #2512

Closed
nasdf opened this issue Apr 10, 2024 · 0 comments · Fixed by #2513
Closed

Move db transactions to context #2512

nasdf opened this issue Apr 10, 2024 · 0 comments · Fixed by #2513
Assignees
Labels
area/db-system Related to the core system related components of the DB
Milestone

Comments

@nasdf
Copy link
Member

nasdf commented Apr 10, 2024

No description provided.

@nasdf nasdf added the area/db-system Related to the core system related components of the DB label Apr 10, 2024
@nasdf nasdf added this to the DefraDB v0.11 milestone Apr 10, 2024
@nasdf nasdf self-assigned this Apr 10, 2024
nasdf added a commit that referenced this issue Apr 12, 2024
## Relevant issue(s)

Resolves #2512
Resolves #2516

## Description

This PR moves the db transactions to the context.

Notable Changes:
- moved `txn_db.go` to `store.go`
- ~replaced `explicitTxnDB` and `implicitTxnDb` with `store`~
- ~added `db/session.go` to simplify setting context~
- added `db/context.go` to manage context values

## Tasks

- [x] I made sure the code is well commented, particularly
hard-to-understand areas.
- [x] I made sure the repository-held documentation is changed
accordingly.
- [x] I made sure the pull request title adheres to the conventional
commit style (the subset used in the project can be found in
[tools/configs/chglog/config.yml](tools/configs/chglog/config.yml)).
- [x] I made sure to discuss its limitations such as threats to
validity, vulnerability to mistake and misuse, robustness to
invalidation of assumptions, resource requirements, ...

## How has this been tested?

`make test`

Specify the platform(s) on which this was tested:
- MacOS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/db-system Related to the core system related components of the DB
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant