-
Notifications
You must be signed in to change notification settings - Fork 205
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
SQL diagnostics #2662
SQL diagnostics #2662
Conversation
61d56f2
to
9f52ccf
Compare
9f52ccf
to
cd55dfd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of nitpicking, probably having two implementations of the runQuery
method based on the logging level is the only one I would push a bit to implement. 🙂 Yay for tracking! 🎉
...c/main/scala/com/digitalasset/platform/sandbox/stores/ledger/sql/dao/PostgresLedgerDao.scala
Outdated
Show resolved
Hide resolved
...c/main/scala/com/digitalasset/platform/sandbox/stores/ledger/sql/dao/PostgresLedgerDao.scala
Outdated
Show resolved
Hide resolved
...c/main/scala/com/digitalasset/platform/sandbox/stores/ledger/sql/dao/PostgresLedgerDao.scala
Outdated
Show resolved
Hide resolved
...c/main/scala/com/digitalasset/platform/sandbox/stores/ledger/sql/dao/PostgresLedgerDao.scala
Outdated
Show resolved
Hide resolved
...c/main/scala/com/digitalasset/platform/sandbox/stores/ledger/sql/dao/PostgresLedgerDao.scala
Outdated
Show resolved
Hide resolved
...c/main/scala/com/digitalasset/platform/sandbox/stores/ledger/sql/dao/PostgresLedgerDao.scala
Outdated
Show resolved
Hide resolved
...x/src/main/scala/com/digitalasset/platform/sandbox/stores/ledger/sql/util/DbDispatcher.scala
Outdated
Show resolved
Hide resolved
...x/src/main/scala/com/digitalasset/platform/sandbox/stores/ledger/sql/util/DbDispatcher.scala
Outdated
Show resolved
Hide resolved
...ox/src/main/scala/com/digitalasset/platform/sandbox/stores/ledger/sql/util/SqlExecutor.scala
Outdated
Show resolved
Hide resolved
This avoids building up the string if trace logging is not enabled (i.e. most of the time). Addresses #2662 (review)
How will this interact with |
Good point, @rautenrieth-da. We keep both. |
This avoids building up the string if trace logging is not enabled (i.e. most of the time). Addresses #2662 (review)
7ae9da2
to
c8059f3
Compare
This avoids building up the string if trace logging is not enabled (i.e. most of the time). Addresses #2662 (review)
6a5aea3
to
16d6913
Compare
This avoids building up the string if trace logging is not enabled (i.e. most of the time). Addresses #2662 (review)
5c15121
to
7b77365
Compare
This avoids building up the string if trace logging is not enabled (i.e. most of the time). Addresses #2662 (review)
7b77365
to
b94df1d
Compare
This does not capture timing of individual statements but rather the time for "units of work". For example "lookup contract" doesn't mean only loading a single row from the contracts table, but also 2 additional queries for looking up witnesses and divulgences. This is not a problem, because this is trace level logging that helps us debug problems and shouldn't be made sense of by users at this stage.
This avoids building up the string if trace logging is not enabled (i.e. most of the time). Addresses #2662 (review)
a89a822
to
fe3fd28
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks good, apart from the change to unreleased.rst
- was that intentional?
@@ -13,12 +13,8 @@ HEAD — ongoing | |||
file to be a pointer to the source directory of the DAML code contained in a project relative to | |||
the project root. This is breaking projects, where the ``source`` field of the project is pointing | |||
to a non-toplevel location in the source code directory structure. | |||
+ [Sandbox] The sandbox now properly sets the connection pool properties ``minimumIdle``, ``maximumPoolSize``, and ``connectionTimeout``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these lines really be deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, a previous automerge messed up the release notes and this is fixing the mess.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah now I see, these are notes that were already moved to the actual release notes. 👍
This PR adds some TRACE level logging for how long database operations are taking.
Also updates the Postgres JDBC driver to the latest release.
I don't intend to merge this before #2425.
Pull Request Checklist
NOTE: CI is not automatically run on non-members pull-requests for security
reasons. The reviewer will have to comment with
/AzurePipelines run
totrigger the build.