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

changefeedccl: support tables with more than one column family #28667

Closed
danhhz opened this issue Aug 15, 2018 · 2 comments
Closed

changefeedccl: support tables with more than one column family #28667

danhhz opened this issue Aug 15, 2018 · 2 comments
Assignees
Labels
A-cdc Change Data Capture C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-cdc

Comments

@danhhz
Copy link
Contributor

danhhz commented Aug 15, 2018

Changefeeds currently work only for tables with exactly one column family, which is the default for all tables created since sometime before 1.0. But some users may have used this feature and we'll need to do some work before changefeeds work on their tables. This will require a followup fetch for the data in the other column families, so even once it's implemented, the changefeed will be somewhat slower.

One possible workaround in the meantime is to allow for envelope=key_only changefeeds on these tables, which is easy to implement and doesn't need the followup fetch.

gz#7511

Epic CRDB-1660

gz#5472

Jira issue: CRDB-4901

@danhhz danhhz added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-cdc Change Data Capture labels Aug 15, 2018
@danhhz danhhz added this to the 2.2 milestone Aug 15, 2018
danhhz added a commit to danhhz/cockroach that referenced this issue Sep 19, 2018
If a table has multiple column families and only one of them is changed
in a given statement, only the kv for that column family will be changed
by the sql system. This means we wouldn't have enough data to
reconstruct the row.

We can fetch the row's entire kv data with a prefix scan that's forced
to be at the timestamp of the changed kv. This has two issues

- it introduces a blocking kv read (in the common case, this is not as
  bad as it sounds since this code is likely running on the leaseholder
  and the data can be served locally)
- if N column families were updated at once, then we'll run this process
  N times and get N exact duplicates in the output

Release note (enterprise change): CHANGEFEEDs now support tables with
multiple column families, though with degraded performance.

Closes cockroachdb#28667
@petermattis petermattis removed this from the 2.2 milestone Oct 5, 2018
@danhhz
Copy link
Contributor Author

danhhz commented Jan 28, 2019

This is quite unfortunately not going to make 2.2

@namibj
Copy link

namibj commented Jan 10, 2020

It would also be nice to get an envelope option that includes (only) what the affected column family contains. This should be relatively easy (mostly gating multi-family tables behind the two restrictive envelopes, and formatting for the envelope).

craig bot pushed a commit that referenced this issue Feb 22, 2022
73995: docs: jobs explainer doc r=samiskin a=samiskin

Similar to "Life of a Query", this change adds an in-depth rundown of
how the job system functions and the various pieces in the code that
drive it and use it.

Release note: None

75430: cdc: refactor to replace map of changefeed targets with array r=[miretskiy] a=HonoreDB

Necessary intermediate step towards changefeeds on things other than full tables.
Previously, changefeed targets were serialized as a map of TableID->StatementTimeName.
This keeps that for now for compatibility but adds in a list of target specifications
that's more extendable, and changes the API for everything that will eventually need
to care (for example, an encoder will need to know that it's encoding a [column family](#28667)).

Still needs a test with the old-style payload.

Release note: None

75965: ui: Add column selector and filter to sessions page r=gtr a=gtr

Closes [#73463](https://cockroachlabs.atlassian.net/browse/CRDB-11600)

Previously, the sessions page was missing the column selector and filter
components that the stmts and txns page have. This change adds both
components in addition to new columns in the sessions overview page and
edits to the sessions details page.



Release note (ui change): added column selector, filters, new columns to
the sessions page and sessions details.

Screenshots:

Sessions overview page:
![sessions-overview-page](https://user-images.githubusercontent.com/35943354/153674473-639b23a5-031a-4d33-90cc-87db24ec7c4a.png)


Sessions overview page with column selector:
![sessions-overview-page-column-selector](https://user-images.githubusercontent.com/35943354/153674485-9503434f-0860-4b84-9ad4-0175586bd986.png)


Sessions overview page with results from column selector:
![sessions-overview-page-column-selector-results](https://user-images.githubusercontent.com/35943354/153674490-788627c7-0392-4d15-a2e5-9c2e79de92f9.png)


Sessions overview page with filter:
![sessions-overview-page-filter](https://user-images.githubusercontent.com/35943354/153674501-a83394ac-2a8a-4035-a030-4f2b2f402ab2.png)


Sessions overview page with results from filter:
![sessions-overview-page-filter-results](https://user-images.githubusercontent.com/35943354/153674508-5b98f52d-7ea0-48f9-bef4-88635878de71.png)


Sessions detail page:
![Screen Shot 2022-02-11 at 4 33 14 PM](https://user-images.githubusercontent.com/35943354/153673353-b984462e-092c-4849-b03a-9a33091e4f45.png)





Co-authored-by: Shiranka Miskin <shiranka.miskin@gmail.com>
Co-authored-by: Aaron Zinger <zinger@cockroachlabs.com>
Co-authored-by: Gerardo Torres <gerardo.torrescastro@cockroachlabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cdc Change Data Capture C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-cdc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants