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

Revert usedb flag which is slow #203

Merged
merged 2 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/input/changes.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func PrepareCaptiveCore(execPath string, tomlPath string, start, end uint32, env
NetworkPassphrase: env.NetworkPassphrase,
HistoryArchiveURLs: env.ArchiveURLs,
Strict: true,
UseDB: true,
UseDB: false,

Choose a reason for hiding this comment

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

was this still slow when BucketListDB was enabled, the setting is only conditionally auto-enabled in horizon 2.24 or greater and when the stellar core binary reports at least 19.6 version stamp

is the stellar core binary installed from a released debian package, to verify, if you run stellar-core version what does it report? the core binary only prints the semver version stamp when built from deb pkg, if it's built from source, then it won't return the expected semver version string and that would prevent the auto-enablement of bucketlistdb usage on captive core in horizon.

to have it be more deterministic, it can be forced on horizon 2.24 and up to always enable bucketlist db on captive core by adding it in the captive core toml conf file template you pass to horizon:

EXPERIMENTAL_BUCKETLIST_DB = true
EXPERIMENTAL_BUCKETLIST_DB_INDEX_PAGE_SIZE_EXPONENT = 12

just wanted to mention the corner case as it could quietly lead to disabled bucketlistdb, which leads to much more i/o on the disk based db.

},
)
if err != nil {
Expand All @@ -45,7 +45,7 @@ func PrepareCaptiveCore(execPath string, tomlPath string, start, end uint32, env
Toml: toml,
NetworkPassphrase: env.NetworkPassphrase,
HistoryArchiveURLs: env.ArchiveURLs,
UseDB: true,
UseDB: false,
},
)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/utils/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ func (e EnvironmentDetails) CreateCaptiveCoreBackend() (*ledgerbackend.CaptiveSt
NetworkPassphrase: e.NetworkPassphrase,
HistoryArchiveURLs: e.ArchiveURLs,
Strict: true,
UseDB: true,
UseDB: false,
},
)
if err != nil {
Expand All @@ -658,7 +658,7 @@ func (e EnvironmentDetails) CreateCaptiveCoreBackend() (*ledgerbackend.CaptiveSt
Toml: captiveCoreToml,
NetworkPassphrase: e.NetworkPassphrase,
HistoryArchiveURLs: e.ArchiveURLs,
UseDB: true,
UseDB: false,
},
)
return backend, err
Expand Down
Loading