-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
ui: statements page should disambiguate statements based on database #33316
Comments
@jordanlewis @piyush-singh we do not currently bucket statement statistics based on the value of the "current database". It's not just a matter of UI, the back-end collection must be changed as well. |
cc @couchand another wrinkle for persistence. I can't believe this didn't occur to me earlier, thanks for flagging @jordanlewis ! Andrew, this makes sense to me as a natural extension to how we handle statement stats/how users would want to filter. We can discuss whether we want to prioritize this for 2.2 at our next sprint planning. Adding as a user story to the persistence AT record. |
As @knz alluded to but may not have made completely clear, it's not just about the storage of the stats but about the way that we collect them. I would expect getting this right to be more complicated than we can reasonably expect to do in 2.2, since it requires a lot more understanding of the semantics of what's going on that we currently kind of pretend don't exist. Just to extend the example a bit, if you added a statement like:
The results would be even more confusing/misleading/wrong -- we'd never combine the same statement if one instance of it used fully-qualified names. I'm happy to brainstorm ideas to address these issues, but they are necessarily much more complicated than just the UI. |
Hey @couchand, totally agreed that this kind of example makes things more complex! But IMO a quick fix would be to just bucket by "current database" and ignore trying to coalesce things more correctly like your example. The use case (that I didn't link to hear because it was in a private repo) was just that there's a product that has several workloads running at once against different databases and they want to see which workload is doing what. |
Here*. ugh |
My point may not have been clear with my example. My point was that, if you want to use database as a criteria to filter/compare on (like you can today with app_name), it's not going to do what you want if it's based solely on the current database setting. |
Ah, right! I forgot that it's also bucketed by app name. I wonder if the problem would have gone away if I had suggested that to this user. |
My first comment above was a matter-of-fact comment on the technicalities of solving the problem. I did not back then express my opinion about this feature ask. Let me do that now. I do not like it. (It makes no sense and we already have a solution anyway. read on.)
That's the thing. The one true and tried way to organize workloads in a pg-like db is Now on why I don't like doing anything with the db name.
I'll start with the same argument as Andrew. One "application" can use multiple databases, going so far as having the same client session switch between values of the current db setting, or using cross-db transactions. There is no "identity" of an app in its current db session var.
Really, it's inconsistent with the other places where we identify applications (table audits, exec log etc). If we start to identify apps by the current db in the UI, we need to start doing so in every other places too. All the while the pg folk have already determined that app_name is the way to go and that the cur db session var is worthless / not interesting. So, IMHO, no. Let's not make this change and instead properly document how to use app_name. |
FWIW I read up on the customer conversation Jordan was involved in back in December. Robert correctly suggested to the customer that they try using app_name. From the conversation, it seems like they saw that as an acceptable solution and were going to try it out. I can follow up and confirm that they managed to set app_name correctly via hibernate and that this solves their need. I'll close this ticket if that is indeed the case. |
ideally we'd rewrite queries to use numerical identifiers for all of their references and use that for fingerprints. That would also give us a fingerprint that we could render back to the user in a nice way if we wanted. Ah, that'd be great. This is yet another reason to need the ability to get fine-grained information out of the optbuilder to rewrite ASTs. |
Summary:
@Annebirzin can you update figma with the new field? Not sure if we want a new column or show some other way |
@maryliag I've explored some initial designs for adding databases to statements here : option 1: add database column with ability to hide/show columns AND add filter by database
option 2: 'group by' database AND filter by database (no database column)
Let me know any thoughts/ideas |
option 1: option2: the collapse part seems to be tricky, maybe we could have a row for the database name, but not necessary have it collapse? I need to investigate a little of how this can be done (and check how it works with pagination as you mentioned) |
role checks for role-based audit logs This change introduces the `sql.log.user_audit.reduced_config.enabled` cluster setting. When enabled, this cluster setting computes a "reduced" audit configuration based on the user's current role memberships and the current value for the `sql.log.user_audit` cluster setting. The "reduced" audit configuration is computed at the _first SQL event emit by the user after the setting is enabled_. Enabling the cluster setting allows us to compute the audit configuration once at session start, instead of computing at each SQL event (providing ~5% increase in throughput). The tradeoff is that changes to the audit configuration (user role memberships or cluster setting configuration) are not reflected within session. Users will need to start a new session to see these changes in their auditing behaviour. Release note (sql change): Introduce new cluster setting `sql.log.user_audit.reduced_config.enabled`. When enabled, this cluster setting computes a "reduced" audit configuration based on the user's current role memberships and the current value for the `sql.log.user_audit` cluster setting. The "reduced" audit configuration is computed at the _first SQL event emit by the user after the setting is enabled_. Enabling the cluster setting allows us to compute the audit configuration once at session start, instead of computing at each SQL event (providing ~5% increase in throughput). The tradeoff is that changes to the audit configuration (user role memberships or cluster setting configuration) are not reflected within session. Users will need to start a new session to see these changes in their auditing behaviour. https://cockroachlabs.atlassian.net/browse/DOC-1355 #Informs: cockroachdb#33316 #Epic: CRDB-8035
role checks for role-based audit logs This change introduces the `sql.log.user_audit.reduced_config.enabled` cluster setting. When enabled, this cluster setting computes a "reduced" audit configuration based on the user's current role memberships and the current value for the `sql.log.user_audit` cluster setting. The "reduced" audit configuration is computed at the _first SQL event emit by the user after the setting is enabled_. Enabling the cluster setting allows us to compute the audit configuration once at session start, instead of computing at each SQL event (providing ~5% increase in throughput). The tradeoff is that changes to the audit configuration (user role memberships or cluster setting configuration) are not reflected within session. Users will need to start a new session to see these changes in their auditing behaviour. Release note (sql change): Introduce new cluster setting `sql.log.user_audit.reduced_config.enabled`. When enabled, this cluster setting computes a "reduced" audit configuration based on the user's current role memberships and the current value for the `sql.log.user_audit` cluster setting. The "reduced" audit configuration is computed at the _first SQL event emit by the user after the setting is enabled_. Enabling the cluster setting allows us to compute the audit configuration once at session start, instead of computing at each SQL event (providing ~5% increase in throughput). The tradeoff is that changes to the audit configuration (user role memberships or cluster setting configuration) are not reflected within session. Users will need to start a new session to see these changes in their auditing behaviour. https://cockroachlabs.atlassian.net/browse/DOC-1355 #Informs: cockroachdb#33316 #Epic: CRDB-8035
role checks for role-based audit logs This change introduces the `sql.log.user_audit.reduced_config.enabled` cluster setting. When enabled, this cluster setting computes a "reduced" audit configuration based on the user's current role memberships and the current value for the `sql.log.user_audit` cluster setting. The "reduced" audit configuration is computed at the _first SQL event emit by the user after the setting is enabled_. Enabling the cluster setting allows us to compute the audit configuration once at session start, instead of computing at each SQL event (providing ~5% increase in throughput). The tradeoff is that changes to the audit configuration (user role memberships or cluster setting configuration) are not reflected within session. Users will need to start a new session to see these changes in their auditing behaviour. Release note (sql change): Introduce new cluster setting `sql.log.user_audit.reduced_config.enabled`. When enabled, this cluster setting computes a "reduced" audit configuration based on the user's current role memberships and the current value for the `sql.log.user_audit` cluster setting. The "reduced" audit configuration is computed at the _first SQL event emit by the user after the setting is enabled_. Enabling the cluster setting allows us to compute the audit configuration once at session start, instead of computing at each SQL event (providing ~5% increase in throughput). The tradeoff is that changes to the audit configuration (user role memberships or cluster setting configuration) are not reflected within session. Users will need to start a new session to see these changes in their auditing behaviour. https://cockroachlabs.atlassian.net/browse/DOC-1355 #Informs: cockroachdb#33316 #Epic: CRDB-8035
role checks for role-based audit logs This change introduces the `sql.log.user_audit.reduced_config.enabled` cluster setting. When enabled, this cluster setting computes a "reduced" audit configuration based on the user's current role memberships and the current value for the `sql.log.user_audit` cluster setting. The "reduced" audit configuration is computed at the _first SQL event emit by the user after the setting is enabled_. Enabling the cluster setting allows us to compute the audit configuration once at session start, instead of computing at each SQL event (providing ~5% increase in throughput). The tradeoff is that changes to the audit configuration (user role memberships or cluster setting configuration) are not reflected within session. Users will need to start a new session to see these changes in their auditing behaviour. Release note (sql change): Introduce new cluster setting `sql.log.user_audit.reduced_config.enabled`. When enabled, this cluster setting computes a "reduced" audit configuration based on the user's current role memberships and the current value for the `sql.log.user_audit` cluster setting. The "reduced" audit configuration is computed at the _first SQL event emit by the user after the setting is enabled_. Enabling the cluster setting allows us to compute the audit configuration once at session start, instead of computing at each SQL event (providing ~5% increase in throughput). The tradeoff is that changes to the audit configuration (user role memberships or cluster setting configuration) are not reflected within session. Users will need to start a new session to see these changes in their auditing behaviour. https://cockroachlabs.atlassian.net/browse/DOC-1355 #Informs: cockroachdb#33316 #Epic: CRDB-8035
role checks for role-based audit logs This change introduces the `sql.log.user_audit.reduced_config.enabled` cluster setting. When enabled, this cluster setting computes a "reduced" audit configuration based on the user's current role memberships and the current value for the `sql.log.user_audit` cluster setting. The "reduced" audit configuration is computed at the _first SQL event emit by the user after the setting is enabled_. Enabling the cluster setting allows us to compute the audit configuration once at session start, instead of computing at each SQL event (providing ~5% increase in throughput). The tradeoff is that changes to the audit configuration (user role memberships or cluster setting configuration) are not reflected within session. Users will need to start a new session to see these changes in their auditing behaviour. Release note (sql change): Introduce new cluster setting `sql.log.user_audit.reduced_config.enabled`. When enabled, this cluster setting computes a "reduced" audit configuration based on the user's current role memberships and the current value for the `sql.log.user_audit` cluster setting. The "reduced" audit configuration is computed at the _first SQL event emit by the user after the setting is enabled_. Enabling the cluster setting allows us to compute the audit configuration once at session start, instead of computing at each SQL event (providing ~5% increase in throughput). The tradeoff is that changes to the audit configuration (user role memberships or cluster setting configuration) are not reflected within session. Users will need to start a new session to see these changes in their auditing behaviour. https://cockroachlabs.atlassian.net/browse/DOC-1355 #Informs: cockroachdb#33316 #Epic: CRDB-8035
role checks for role-based audit logs This change introduces the `sql.log.user_audit.reduced_config.enabled` cluster setting. When enabled, this cluster setting computes a "reduced" audit configuration based on the user's current role memberships and the current value for the `sql.log.user_audit` cluster setting. The "reduced" audit configuration is computed at the _first SQL event emit by the user after the setting is enabled_. Enabling the cluster setting allows us to compute the audit configuration once at session start, instead of computing at each SQL event (providing ~5% increase in throughput). The tradeoff is that changes to the audit configuration (user role memberships or cluster setting configuration) are not reflected within session. Users will need to start a new session to see these changes in their auditing behaviour. Release note (sql change): Introduce new cluster setting `sql.log.user_audit.reduced_config.enabled`. When enabled, this cluster setting computes a "reduced" audit configuration based on the user's current role memberships and the current value for the `sql.log.user_audit` cluster setting. The "reduced" audit configuration is computed at the _first SQL event emit by the user after the setting is enabled_. Enabling the cluster setting allows us to compute the audit configuration once at session start, instead of computing at each SQL event (providing ~5% increase in throughput). The tradeoff is that changes to the audit configuration (user role memberships or cluster setting configuration) are not reflected within session. Users will need to start a new session to see these changes in their auditing behaviour. https://cockroachlabs.atlassian.net/browse/DOC-1355 #Informs: cockroachdb#33316 #Epic: CRDB-8035
This change moves the existing role-based audit logging logic to be consumed as a CCL (enterprise) feature. https://cockroachlabs.atlassian.net/browse/DOC-1355 #Informs: cockroachdb#33316 #Epic: CRDB-8035 (sql change): #Release note (ui change): #Release note (security update): #Release note (general change): (performance improvement): #Release note (bug fix):
This change moves the existing role-based audit logging logic to be consumed as a CCL (enterprise) feature. Release note (sql change): role-based audit logging not a CCL (enterprise) feature https://cockroachlabs.atlassian.net/browse/DOC-1355 #Informs: cockroachdb#33316 #Epic: CRDB-8035
This change moves the existing role-based audit logging logic to be consumed as a CCL (enterprise) feature. Release note (sql change): role-based audit logging not a CCL (enterprise) feature https://cockroachlabs.atlassian.net/browse/DOC-1355 #Informs: cockroachdb#33316 #Epic: CRDB-8035
Now that we are on the 23.1 -> 23.2 path, we no longer need this mixed version test case for 22.2 -> 23.1 on `master`. Release note: None https://cockroachlabs.atlassian.net/browse/DOC-1355 #Informs: cockroachdb#33316 #Epic: CRDB-8035
Release note (bug fix): This change fixes a race/deadlock condition that can occur when multiple SQLServers are created simulatenously, causing simultaneous write to an unprotected global variable used to configure a CCL audit logging feature. https://cockroachlabs.atlassian.net/browse/DOC-1355 #Informs: cockroachdb#33316 #Epic: CRDB-8035 (sql change): #Release note (ui change): #Release note (security update): #Release note (general change): (performance improvement): #Release note (bug fix):
Release note (bug fix): This change fixes a race/deadlock condition that can occur when multiple SQLServers are created simulatenously, causing simultaneous write to an unprotected global variable used to configure a CCL audit logging feature. https://cockroachlabs.atlassian.net/browse/DOC-1355 #Informs: cockroachdb#33316 #Epic: CRDB-8035 (sql change): #Release note (ui change): #Release note (security update): #Release note (general change): (performance improvement): #Release note (bug fix):
Previously, for resolving the cluster's license expiry we relied on a metric whose value was regularly ticked down by an async task. This change seeks to only the resolve value at read time by reading directly from the cluster settings when its requested. Release note: None Fixes: cockroachdb#77376 Part of: https://cockroachlabs.atlassian.net/browse/DOC-1355 Informs: cockroachdb#33316 Epic: CRDB-8035
Currently, statements on the statement page do not seem to be bucketed by database. This makes it impossible to distinguish whether a statement on a table is from one database or another.
Repro:
Actual result:
Expected: the two
INSERT
statements should not be in the same bucket, since they're on different tables, despite the tables having the same name.The text was updated successfully, but these errors were encountered: