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

Caplin: Automatic retirement of state tables to their own snapshot files [DO NOT MERGE] #12508

Open
wants to merge 137 commits into
base: main
Choose a base branch
from

Conversation

Giulio2002
Copy link
Contributor

No description provided.

@Giulio2002 Giulio2002 marked this pull request as draft October 28, 2024 01:10
@Giulio2002 Giulio2002 changed the title Caplin: Automatic retirement of state tables to their own snapshot files Caplin: Automatic retirement of state tables to their own snapshot files [DO NOT MERGE] Oct 28, 2024
var err error
if err := db.View(context.TODO(), func(tx kv.Tx) error {
key = base_encoding.Encode64ToBytes4(numId)
value, err = tx.GetOne(tableName, base_encoding.Encode64ToBytes4(numId))
Copy link
Collaborator

Choose a reason for hiding this comment

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

value valid only until end of transaction:

  • or accept kv.Tx from outside to extend lifetime of value
  • or copy it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ii see...

@Giulio2002 Giulio2002 marked this pull request as ready for review November 6, 2024 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants