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

ingest/ledgerbackend: Refactor captive core process manager #5360

Merged
merged 4 commits into from
Jun 28, 2024

Conversation

tamirms
Copy link
Contributor

@tamirms tamirms commented Jun 26, 2024

PR Checklist

PR Structure

  • This PR has reasonably narrow scope (if not, break it down into smaller PRs).
  • This PR avoids mixing refactoring changes with feature changes (split into two PRs
    otherwise).
  • This PR's title starts with name of package that is most changed in the PR, ex.
    services/friendbot, or all or doc if the changes are broad or impact many
    packages.

Thoroughness

  • This PR adds tests for the most critical parts of the new functionality or fixes.
  • I've updated any docs (developer docs, .md
    files, etc... affected by this change). Take a look in the docs folder for a given service,
    like this one.

Release planning

  • I've updated the relevant CHANGELOG (here for Horizon) if
    needed with deprecations, added features, breaking changes, and DB schema changes.
  • I've decided if this PR requires a new major/minor version according to
    semver, or if it's mainly a patch change. The PR is targeted at the next
    release branch if it's not a patch change.

What

Refactor stellarCoreRunner to fix the following issues related to process termination and leaking of resources like goroutines:

#5349
#5342
#5347

Known limitations

[N/A]

@tamirms tamirms requested a review from a team June 26, 2024 18:47
Copy link
Contributor

@2opremio 2opremio left a comment

Choose a reason for hiding this comment

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

Really nice! I am looking forward to test it in soroban RPC!

@urvisavla
Copy link
Contributor

it's really nice to have split the code into multiple files such as catchup.go, runfrom.go etc, but since the ledgerbackend directory is not only for the captive-core ledger backend. Do you think it makes sense to either group all the captive-core ledgerbackend-related files into another subdirectory within ledgerbackend directory or prefix the file names with "captive-core" (though shorter file names are preferable)? This also applies to some of the existing files such as toml.go etc.

@tamirms
Copy link
Contributor Author

tamirms commented Jun 27, 2024

@urvisavla I think every file in the ledgerbackend directory is related to captive-core except for the code which implements and tests the BufferedStorageBackend . I'm reluctant to create a separate package for captive-core because that would require all users of captive-core to update their import paths

@tamirms tamirms enabled auto-merge (squash) June 28, 2024 06:24
@tamirms tamirms merged commit b589529 into stellar:master Jun 28, 2024
23 checks passed
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.

3 participants