Skip to content

Conversation

@arner
Copy link
Contributor

@arner arner commented Dec 12, 2024

Allows for use case specific tuning of database parameters.

    maxOpenConns: 20  # optional: max open read connections to the database. Defaults to unlimited. See https://go.dev/doc/database/manage-connections.
    maxIdleConns: 20  # optional: max idle read connections to the database. Defaults to 2.
    maxIdleTime: 30s  # optional: max duration a connection can be idle before it is closed. Defaults to 1 minute.

It also exposes a function Stats(): any to the database driver. This can be used for debugging or observability in general. In the case of SQL databases, this provides details about the connection pool (see go docs. For Badger, it returns the metrics for the underlying block cache.

Signed-off-by: Arne Rutjes <arne123@gmail.com>
@adecaro
Copy link
Contributor

adecaro commented Dec 12, 2024

@arner , please:

  • Can you add a comment to the description of the PR about the Stat function?
  • Can you open a PR in the token-sdk that tests this commit?
    Many thanks :)

@arner
Copy link
Contributor Author

arner commented Dec 12, 2024

Sibling PR at token sdk: hyperledger-labs/fabric-token-sdk#805

@adecaro adecaro self-requested a review December 12, 2024 19:33
@adecaro adecaro self-assigned this Dec 12, 2024
Copy link
Contributor

@adecaro adecaro left a comment

Choose a reason for hiding this comment

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

LGTM

@adecaro adecaro merged commit 55ffb2e into main Dec 12, 2024
19 checks passed
@adecaro adecaro deleted the f-configure-db branch December 12, 2024 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants