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

Save column sorts across a user session #68199

Closed
kevin-v-ngo opened this issue Jul 28, 2021 · 2 comments
Closed

Save column sorts across a user session #68199

kevin-v-ngo opened this issue Jul 28, 2021 · 2 comments
Assignees
Labels
A-sql-console-general SQL Observability issues on the DB console spanning multiple areas. Includes Cockroach Cloud Console C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Comments

@kevin-v-ngo
Copy link

kevin-v-ngo commented Jul 28, 2021

The DB console should save the column sort specified by the user across a session. For instance, when the user drills into the Statement details page, coming back to the Statements overview page should have the column ordering/sort preserved.

Epic: CRDB-9867

@kevin-v-ngo kevin-v-ngo added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-observability labels Jul 28, 2021
@kevin-v-ngo kevin-v-ngo added the A-sql-console-general SQL Observability issues on the DB console spanning multiple areas. Includes Cockroach Cloud Console label Jul 28, 2021
@kevin-v-ngo
Copy link
Author

Note this behavior would need to be consistent with all other pages in the DB console

@maryliag maryliag self-assigned this Oct 4, 2021
@maryliag maryliag removed their assignment Oct 4, 2021
@maryliag maryliag self-assigned this Nov 1, 2021
maryliag added a commit to maryliag/cockroach that referenced this issue Nov 16, 2021
Previously, a sort selection was not maintained when
the page change (e.g. coming back from Statement details).
This commits saves the selected value to be used.

Partially adressed cockroachdb#68199

Release note: None
maryliag added a commit to maryliag/cockroach that referenced this issue Nov 17, 2021
Previously, a sort selection was not maintained when
the page change (e.g. coming back from Statement details).
This commits saves the selected value to be used.

Partially adressed cockroachdb#68199

Release note: None
craig bot pushed a commit that referenced this issue Nov 17, 2021
72844: ui: save sort on cache for Statement page r=maryliag a=maryliag

Previously, a sort selection was not maintained when
the page change (e.g. coming back from Statement details).
This commits saves the selected value to be used.

Partially adressed #68199

Release note: None

Co-authored-by: Marylia Gutierrez <[email protected]>
maryliag added a commit to maryliag/cockroach that referenced this issue Nov 17, 2021
Previously, a sort selection was not maintained when
the page change (e.g. coming back from Transaction details).
This commits saves the selected value to be used.

Partially adressed cockroachdb#68199

Release note: None
maryliag added a commit to maryliag/cockroach that referenced this issue Nov 17, 2021
Previously, a sort selection was not maintained when
the page change (e.g. coming back from Session details).
This commits saves the selected value to be used.

Partially adressed cockroachdb#68199

Release note: None
maryliag added a commit to maryliag/cockroach that referenced this issue Nov 22, 2021
Previously, a sort selection was not maintained when
the page change (e.g. coming back from Transaction details).
This commits saves the selected value to be used.

Partially adressed cockroachdb#68199

Release note: None
maryliag added a commit to maryliag/cockroach that referenced this issue Nov 22, 2021
Previously, a sort selection was not maintained when
the page change (e.g. coming back from Session details).
This commits saves the selected value to be used.

Partially adressed cockroachdb#68199

Release note: None
maryliag added a commit to maryliag/cockroach that referenced this issue Nov 22, 2021
Previously, a sort selection was not maintained when
the page change (e.g. coming back from Statement details).
This commits saves the selected value to be used.

Partially adressed cockroachdb#68199

Release note: None
maryliag added a commit to maryliag/cockroach that referenced this issue Nov 22, 2021
Previously, a sort selection was not maintained when
the page change (e.g. coming back from Transaction details).
This commits saves the selected value to be used.

Partially adressed cockroachdb#68199

Release note: None
maryliag added a commit to maryliag/cockroach that referenced this issue Nov 22, 2021
Previously, a sort selection was not maintained when
the page change (e.g. coming back from Session details).
This commits saves the selected value to be used.

Partially adressed cockroachdb#68199

Release note: None
maryliag added a commit to maryliag/cockroach that referenced this issue Dec 10, 2021
Previously, we had two different components for sortedTable,
one in cluster-ui, other in db-console.
This commits remove the one on db-console and replaces all
usages to the cluster-ui component.

This change is necessary for the alignment of sortSettings
and saving the sort on the Jobs page, for issue
cockroachdb#68199

Release note: None
craig bot pushed a commit that referenced this issue Dec 13, 2021
73404: tracing,server,distsql: optimize RPC trace creating for common RPCs r=andreimatei a=andreimatei

Before this patch, tracing across RPC boundaries is implemented by gRPC
interceptors that marshall the trace info from the client to the server
as gRPC metadata, and transparently open client and server spans.
Unfortunately, sending this metadata around the actual request is quite
expensive: it takes 10 allocations per RPC on the client and some on the
server. Some of these allocations can be optimized, but not all due to
the gRPC interfaces; this metadata is just not thought out to be
efficient. Additionally, back in the day, this metadata was measured to
produce a very significant increase in network packets (#17177). At the
time, this was reason enough to avoid this producing this metadata when
tracing is not enabled. I have not measured this again, nor was this
effect measured beyond the network packets metric, but I hope to enable
tracing enough such that, unless we do something else, this metadata
would again be always produced.

This patch optimizes tracing for the 3 most common RPCs in the system:
- Internal.Batch
- DistSQL.SetupFlow, DistSQL.FlowStream.

In the case of FlowStream, we simply do away with tracing. FlowStream is
a streaming RPC used by an Outbox to send its data to another node. The
outbox has its own span; the RPC's span did not have any information.
In fact I'm fairly sure we were not even collecting the RPC's stream in
the trace recordings.

For the other two, the respective clients and servers take on the
responsibility of marshalling the tracing information and creating
server-side spans. The client's trace info gets put into the request
protos - which dirties the respective protos with this concern. In the
case of Batch, the code and the protos were already concerned with
tracing because they dealt with returning the recording; that part was
never abstracted inside the interceptors. In fact, the tracing code for
that RPC gets cleaner: before, setupSpanForIncomingRPC() was collecting
the recording of a *parent* span; this practice is very unusual and
results in a span that shows up as "_unfinished" in the recording.

BenchmarkTracing shows a significant reduction in allocations, and also
latency, for the 3-node tracing-on cases:

name                               old time/op    new time/op    delta
Tracing/3node/scan/trace=on-24        883µs ± 2%     847µs ± 1%  -4.11%  (p=0.008 n=5+5)
Tracing/3node/insert/trace=on-24     1.08ms ± 3%    1.04ms ± 3%  -3.94%  (p=0.016 n=5+5)

name                               old allocs/op  new allocs/op  delta
Tracing/3node/scan/trace=on-24          868 ± 0%       840 ± 0%  -3.20%  (p=0.008 n=5+5)
Tracing/3node/insert/trace=on-24        803 ± 0%       788 ± 0%  -1.89%  (p=0.008 n=5+5)

kv95/enc=false/nodes=3 shows a good increase in throughput (2% on this
set of 10 runs, but I think it's actually a bit higher). This is a big
chunk of the current throughput penalty for enabling a minimal level of
tracing.

name                    old ops/s    new ops/s    delta
kv95/enc=false/nodes=3   31.9k ± 3%   32.6k ± 4%  +2.16%  (p=0.027 n=8+9)

Release note: None

73442: flowinfra: don't use log scope for tests due to flakiness r=yuzefovich a=yuzefovich

The tests occasionally fail during the cleanup of the log scope, so
let's remove the scope (possibly temporarily).

Fixes: #73419.
Addresses: #73375.

Release note: None

73704: ui: use sortedTable from cluster-ui r=maryliag a=maryliag

Previously, we had two different components for sortedTable,
one in cluster-ui, other in db-console.
This commits remove the one on db-console and replaces all
usages to the cluster-ui component.

This change is necessary for the alignment of sortSettings
and saving the sort on the Jobs page, for issue
#68199

Release note: None

73738: keys,sql/catalog: add interface to check whether an ID is in the system db r=ajwerner a=ajwerner

This interface will be used to replace the functions which compare to
constants. Second commit does some plumbing into the server. 

Release note: None

Co-authored-by: Andrei Matei <[email protected]>
Co-authored-by: Yahor Yuzefovich <[email protected]>
Co-authored-by: Marylia Gutierrez <[email protected]>
Co-authored-by: Andrew Werner <[email protected]>
maryliag added a commit to maryliag/cockroach that referenced this issue Dec 13, 2021
Previously, the filter values for Jobs page were being saved
on cache, but the value on query params were not being updated
and not being used.
On this commit, those values are updated and the query params
take priority from cached values.

Partially addresses cockroachdb#68199

Release note: None
maryliag added a commit to maryliag/cockroach that referenced this issue Dec 14, 2021
Previously, sort setting on Databases page were not
being stored. With this commits we save the info about sort settings,
so the value is the same when the user goes back to those pages.
This commit also updates the value on query params and that value
take priority over the cached valued.

Partially addresses cockroachdb#68199

Release note: None
craig bot pushed a commit that referenced this issue Dec 14, 2021
73755: ui: updating query params for Jobs page r=maryliag a=maryliag

Previously, the filter values for Jobs page were being saved
on cache, but the value on query params were not being updated
and not being used.
On this commit, those values are updated and the query params
take priority from cached values.

Partially addresses #68199

Release note: None

Co-authored-by: Marylia Gutierrez <[email protected]>
craig bot pushed a commit that referenced this issue Dec 14, 2021
73795: ui: save sort settings on cache for Database page r=maryliag a=maryliag

Previously, sort setting on Databases page were not
being stored. With this commits we save the info about sort settings,
so the value is the same when the user goes back to those pages.
This commit also updates the value on query params and that value
take priority over the cached valued.

Partially addresses #68199

Release note: None

Co-authored-by: Marylia Gutierrez <[email protected]>
maryliag added a commit to maryliag/cockroach that referenced this issue Dec 15, 2021
Previously, sort setting and the View type on Databases Details page were not
being stored. With this commits we save the info about sort settings and the
view type so the value is the same when the user goes back to those pages.
This commit also updates the value on query params and that value
take priority over the cached valued.

Partially addresses cockroachdb#68199

Release note: None
maryliag added a commit to maryliag/cockroach that referenced this issue Dec 15, 2021
Previously, we had two different components for sortedTable,
one in cluster-ui, other in db-console.
This commits remove the one on db-console and replaces all
usages to the cluster-ui component.

This change is necessary for the alignment of sortSettings
and saving the sort on the Jobs page, for issue
cockroachdb#68199

Release note: None
maryliag added a commit to maryliag/cockroach that referenced this issue Dec 15, 2021
Previously, the filter values for Jobs page were being saved
on cache, but the value on query params were not being updated
and not being used.
On this commit, those values are updated and the query params
take priority from cached values.

Partially addresses cockroachdb#68199

Release note: None
maryliag added a commit to maryliag/cockroach that referenced this issue Dec 15, 2021
Previously, sort setting and the View type on Databases Details page were not
being stored. With this commits we save the info about sort settings and the
view type so the value is the same when the user goes back to those pages.
This commit also updates the value on query params and that value
take priority over the cached valued.

Partially addresses cockroachdb#68199

Release note: None
craig bot pushed a commit that referenced this issue Dec 16, 2021
73822: settings: minor code cleanup r=RaduBerinde a=RaduBerinde

#### settings: minor code cleanup

 - separate internal and values from the public APIs.

 - rename `WritableSetting` to `NonMaskedSetting` ("writable" will
   become confusing when we will have "tenant read-only" and "tenant
   writable" settings).

 - rename `extendedSetting` to `internalSetting`.

Release note: None

#### settings: move the global singleton to logcrash

The settings package has support for storing a global (singleton)
`*Values` which is used for crash reporting. Since there is only one
use case, and we definitely don't want to encourage this pattern, this
commit moves it to the `logcrash` package.

Release note: None

73842: kvserver: rewrite TestStoreScanInconsistentResolvesIntents r=aliher1911 a=tbg

This is more pleasant to look at and it also avoids messing with
`txnAutoGC`.

Release note: None


73846: scripts: add pprof-post to upload to polar signals r=irfansharif a=tbg

Ever since discovering [Polar Signal]'s online pprof web
interface, we've been using it regularly during investigations. It
significantly reduces the friction associated with sharing a profile
with others (or even looking at it by yourself). However, it was always
a little painful to manually upload the profile.

This commit adds a script that makes it very simple:

```
$ scripts/pprof-post.sh < ~/Downloads/logs/2.unredacted/heap_profiler/memprof.2021-12-09T13_25_01.236.4456698968.pprof
```

which outputs the link:

https://share.polarsignals.com/d7b5e1e

Kudos to Polar Signals for providing this very useful service.

[Polar Signal]: https://www.polarsignals.com

Release note: None


73848: kvserver: skip TestLeasePreferencesDuringOutage under stress r=[lunevalex,erikgrinaker] a=tbg

Fixes #70113.

Release note: None


73879: ui: save sort settings and view type  on cache for Database Details page r=maryliag a=maryliag

Previously, sort setting and the View type on Databases Details page were not
being stored. With this commits we save the info about sort settings and the
view type so the value is the same when the user goes back to those pages.
This commit also updates the value on query params and that value
take priority over the cached valued.

Partially addresses #68199

Release note: None

Co-authored-by: Radu Berinde <[email protected]>
Co-authored-by: Tobias Grieger <[email protected]>
Co-authored-by: Marylia Gutierrez <[email protected]>
maryliag added a commit to maryliag/cockroach that referenced this issue Dec 17, 2021
Previously, sort setting on Databases page were not
being stored. With this commits we save the info about sort settings,
so the value is the same when the user goes back to those pages.
This commit also updates the value on query params and that value
take priority over the cached valued.

Partially addresses cockroachdb#68199

Release note: None
maryliag added a commit to maryliag/cockroach that referenced this issue Dec 17, 2021
Previously, sort setting and the View type on Databases Details page were not
being stored. With this commits we save the info about sort settings and the
view type so the value is the same when the user goes back to those pages.
This commit also updates the value on query params and that value
take priority over the cached valued.

Partially addresses cockroachdb#68199

Release note: None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-console-general SQL Observability issues on the DB console spanning multiple areas. Includes Cockroach Cloud Console C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Projects
None yet
Development

No branches or pull requests

2 participants