Skip to content

release-21.2: ui: unify cluster-ui stores for Statement and Transaction Page#73148

Merged
Azhng merged 1 commit intorelease-21.2from
blathers/backport-release-21.2-72627
Nov 26, 2021
Merged

release-21.2: ui: unify cluster-ui stores for Statement and Transaction Page#73148
Azhng merged 1 commit intorelease-21.2from
blathers/backport-release-21.2-72627

Conversation

@blathers-crl
Copy link
Copy Markdown

@blathers-crl blathers-crl bot commented Nov 24, 2021

Backport 1/1 commits from #72627 on behalf of @Azhng.

/cc @cockroachdb/release


Previously, on CC Conosle, Statement Page and Transaction Page were backed by
their own Redux stores and their own Redux Sagas. However, both Statement
and Transaction Page were backed by a single API endpoint, namely
/_status/statements. This resulted in unnecessary API calls and bugs
like #72009, which was caused by Reset SQL Stats sagas failing to
reset the Transaction Page Redux store.

This commit unifies the following Redux store and sagas into a single
store / sagas:

  1. Statement Page store / sagas
  2. Transaciton Page store / sagas
  3. Reset SQL Stats store / sagas

This greatly removed the code duplication and test duplication and simplify
the logic. Statement Page and Transaction Page can reuse the same store
by their own selectors.

Resolves #72009

Release note: None

CC Console:

cc.mov

DB Console:

Screen.Recording.2021-11-09.at.23.07.17.mov

Release justification: Low risk, high benefit changes to existing functionality

Previously, on CC Conosle, Statement Page and Transaction Page were backed by
their own Redux stores and their own Redux Sagas. However, both Statement
and Transaction Page were backed by a single API endpoint, namely
`/_status/statements`. This resulted in unnecessary API calls and bugs
like #72009, which was caused by Reset SQL Stats sagas failing to
reset the Transaction Page Redux store.

This commit unifies the following Redux store and sagas into a single
store / sagas:
1. Statement Page store / sagas
2. Transaciton Page store / sagas
3. Reset SQL Stats store / sagas

This greatly removed the code duplication and test duplication and simplify
the logic. Statement Page and Transaction Page can reuse the same store
by their own selectors.

Resolves #72009

Release note: None
@blathers-crl blathers-crl bot force-pushed the blathers/backport-release-21.2-72627 branch from 0a1c10b to 3d94480 Compare November 24, 2021 23:38
@blathers-crl blathers-crl bot requested review from Azhng and maryliag November 24, 2021 23:38
@blathers-crl
Copy link
Copy Markdown
Author

blathers-crl bot commented Nov 24, 2021

Thanks for opening a backport.

Please check the backport criteria before merging:

  • Patches should only be created for serious issues or test-only changes.
  • Patches should not break backwards-compatibility.
  • Patches should change as little code as possible.
  • Patches should not change on-disk formats or node communication protocols.
  • Patches should not add new functionality.
  • Patches must not add, edit, or otherwise modify cluster versions; or add version gates.
If some of the basic criteria cannot be satisfied, ensure that the exceptional criteria are satisfied within.
  • There is a high priority need for the functionality that cannot wait until the next release and is difficult to address in another way.
  • The new functionality is additive-only and only runs for clusters which have specifically “opted in” to it (e.g. by a cluster setting).
  • New code is protected by a conditional check that is trivial to verify and ensures that it only runs for opt-in clusters.
  • The PM and TL on the team that owns the changed code have signed off that the change obeys the above rules.

Add a brief release justification to the body of your PR to justify this backport.

Some other things to consider:

  • What did we do to ensure that a user that doesn’t know & care about this backport, has no idea that it happened?
  • Will this work in a cluster of mixed patch versions? Did we test that?
  • If a user upgrades a patch version, uses this feature, and then downgrades, what happens?

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@Azhng Azhng merged commit a998d66 into release-21.2 Nov 26, 2021
@Azhng Azhng deleted the blathers/backport-release-21.2-72627 branch November 26, 2021 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants