Storage lifecycle instances need a shutdown hook

Open
#1,111 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
50/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
go
Domain
backend

Research direction

Start by locating the storage lifecycle implementations and the existing higher-level shutdown hook, then trace how context cancellation currently stops background goroutines. Define how storage implementations signal that their work has safely completed and how the caller waits for it. Done means the hook reliably blocks until storage background processes finish, including in tests.

Written by the indexing model from the issue text.

Description

enhancement

Description

Instances of storage lifecycle objects usually create background goroutines to perform various operations asynchronously. Currently, these are generally signaled to exit via context cancellation.

This is mostly fine, but occasionally causes issues in tests when things run on longer than they should.

We already have a shutdown hook at the level above which enables the caller to block until work has finished on the entries they've added, it would be good to extend that to allow storage implementation to signal when their background processes have also safely completed.

Dominant language
Go
Stars
238
Forks
56
Avg merge
1d 2h
Merged PRs (30d)
35

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from transparency-dev/tessera

All issues in transparency-dev/tessera

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.