Skip to content

Clarify RDI snapshot modes and missed deletes - #4238

Open
ZdravkoDonev-redis wants to merge 4 commits into
mainfrom
docs/rdi-snapshot-modes-and-missed-deletes
Open

ZdravkoDonev-redis wants to merge 4 commits into
mainfrom
docs/rdi-snapshot-modes-and-missed-deletes

Conversation

@ZdravkoDonev-redis

@ZdravkoDonev-redis ZdravkoDonev-redis commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

When a saved source log position expires, when_needed can take a new snapshot and resume collection while leaving deleted rows in Redis. The current docs do not explain this gap or the connector differences between snapshot modes.

This change compares all six listed modes for Debezium sources and adds a shared Mermaid timeline to the latest and v1.19.1 configuration guides. It updates the configuration references, deployment/reset guidance, troubleshooting, multiple-source guidance, and Cloud pages. Reset and target cleanup remain separate. The embed shortcode now enables Mermaid rendering in the parent page.

The Cloud FAQ includes a six-event timeline with colored markers and alternating labels on wide screens. It switches to a vertical timeline when the content area is narrow. The diagram uses semantic HTML and CSS, with no JavaScript dependency.

The Architecture guarantee remains unchanged, with an open product-review note about expired history and missed deletes.

Validation:

  • Verified connector semantics against the bundled Debezium 3.5 baseline, including PostgreSQL no_data.
  • Focused Hugo 0.143.1 build passed without warnings.
  • YAML examples validate for all six modes; added links and anchors pass.
  • Latest and v1.19.1 sequence diagrams render at desktop and 390 px widths without horizontal overflow.
  • FAQ timeline checked at 1440, 1280, 768, 390, and 320 px widths: all six events remain readable, text is at least 14 px, and the page has no horizontal overflow.

Companion schema-description PR: https://github.com/RedisLabs/redis-data-integration/pull/2886

Context: Slack discussion.


Note

Low Risk
Documentation-only changes with no runtime or configuration behavior changes in this repository.

Overview
Documents Debezium snapshot.mode for RDI CDC sources and the stale-target gap when recovery snapshots cannot replay expired source log history (especially missed deletes under when_needed).

Adds shared embeds (rdi-snapshot-modes.md, rdi-snapshot-gap.md with a Mermaid sequence diagram) and a Choose a snapshot mode section in the latest and v1.19.1 pipeline guides, including a six-mode comparison table and Debezium 3.5 connector notes. The embed-md shortcode now propagates hasMermaid so diagrams render on parent pages.

Reframes operational docs so redis-di reset, stop/start, multi-source lifecycle, and Redis Cloud flows depend on configured snapshot mode: reset clears saved positions without changing mode or flushing Redis; reload and restart behavior vary by mode (initial_only, no_data, always, etc.). Architecture adds a note that at-least-once applies only to captured events. New troubleshooting covers unavailable source log history and links to missed-delete recovery guidance. Config reference and CLI pages cross-link the new section.

Reviewed by Cursor Bugbot for commit f6d2bb1. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Staging links:
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/embeds/rdi-snapshot-modes
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/integrate/redis-data-integration/1.19.1/architecture/
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/integrate/redis-data-integration/1.19.1/data-pipelines/deploy/
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/integrate/redis-data-integration/1.19.1/data-pipelines/pipeline-config
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/integrate/redis-data-integration/1.19.1/data-pipelines/pipeline-config/
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/integrate/redis-data-integration/1.19.1/reference/cli/redis-di-reset/
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/integrate/redis-data-integration/1.19.1/reference/config-yaml-reference/
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/integrate/redis-data-integration/1.19.1/troubleshooting/
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/integrate/redis-data-integration/architecture/
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/integrate/redis-data-integration/data-pipelines/deploy/
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/integrate/redis-data-integration/data-pipelines/multiple-sources/
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/integrate/redis-data-integration/data-pipelines/pipeline-config
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/integrate/redis-data-integration/data-pipelines/pipeline-config/
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/integrate/redis-data-integration/reference/cli/redis-di-reset/
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/integrate/redis-data-integration/reference/config-yaml-reference/
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/integrate/redis-data-integration/troubleshooting/
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/operate/rc/rdi/define/
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/operate/rc/rdi/faq/
https://redis.io/docs/staging/docs/rdi-snapshot-modes-and-missed-deletes/operate/rc/rdi/view-edit/

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

Found 8 related items from repository history:

Memory updated at f6d2bb1

Comment thread content/integrate/redis-data-integration/1.19.1/architecture/_index.md Outdated
Comment thread content/integrate/redis-data-integration/1.19.1/data-pipelines/pipeline-config.md Outdated
Comment thread content/integrate/redis-data-integration/architecture/_index.md Outdated
Comment thread content/integrate/redis-data-integration/reference/config-yaml-reference.md Outdated

@andy-stark-redis andy-stark-redis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions (mainly adding the word "mode" after always, initial, etc) and I'd prefer not to use that new shortcode unless you really feel it's necessary. Otherwise looks good, so I'll approve to avoid holding you up.

Comment thread content/embeds/rdi-snapshot-modes.md Outdated
Comment thread content/embeds/rdi-snapshot-modes.md Outdated
Comment thread content/integrate/redis-data-integration/1.19.1/troubleshooting.md Outdated
Comment thread content/integrate/redis-data-integration/data-pipelines/deploy.md Outdated
Comment thread content/integrate/redis-data-integration/data-pipelines/multiple-sources.md Outdated
Comment thread content/operate/rc/rdi/define.md Outdated
Comment thread content/operate/rc/rdi/define.md Outdated
Comment thread content/operate/rc/rdi/faq.md Outdated
Comment thread content/operate/rc/rdi/faq.md Outdated
Comment thread content/operate/rc/rdi/view-edit.md Outdated
@@ -62,11 +62,11 @@ When extending an older single-source pipeline, preserve the original source nam
1. On **Dashboard**, open the source card's **More actions** menu.
1. Select **Stop source**, then confirm with **Stop source**.

Stopping one source pauses data capture from that source without stopping the other sources. Starting it again resumes from its saved position. To resume a source, open its **More actions** menu and select **Start source**, then confirm with **Start source**. A source processes data only while the pipeline is running. See [How does stopping sources affect billing?](/content/operate/rc/rdi/faq.md#stopping-and-billing).
Stopping one source pauses data capture from that source without stopping the other sources. Starting a Debezium source again follows its [snapshot mode](/content/integrate/redis-data-integration/data-pipelines/pipeline-config.md#choose-a-snapshot-mode) and the availability of its saved position. To resume a source, open its **More actions** menu and select **Start source**, then confirm with **Start source**. A source processes data only while the pipeline is running. See [How does stopping sources affect billing?](/content/operate/rc/rdi/faq.md#stopping-and-billing).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are mentioning "Debezium" explicitly here, perhaps we should also mention the behavior for other non-Debezium sources e.g. spanner and snowflake.

position, then streams changes. A restart with a completed snapshot and a valid saved
position resumes streaming. Deployment or restart alone does not require a new snapshot.
If the saved position is no longer available, `initial` does not automatically
re-snapshot to recover, and the collector can report an error.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
re-snapshot to recover, and the collector can report an error.
re-snapshot to recover, and the collector stops and reports an error.

position resumes streaming. Deployment or restart alone does not require a new snapshot.
If the saved position is no longer available, `initial` does not automatically
re-snapshot to recover, and the collector can report an error.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding that "A restart in the middle of the snapshot causes the snapshot to start again. This can also result in a snapshot gap, where deleted records remain in the target"

Comment on lines +36 to +37
An interrupted initial snapshot can restart when the collector starts again, including
with `initial` and `initial_only`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check my comments regarding a restart during the snapshot above.

Comment on lines +12 to +15
With `when_needed` mode, the collector also takes a new snapshot when it detects that the
saved position is no longer available. This can reload all selected data after an
outage without a manual reset. The snapshot captures current rows, rather than
reconstructing every missed change.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps a warning should be added here that using when_needed may cause a long-running snapshot in recoverable situations, e.g., restoring the missing offset on the server. If when_needed is used, this should be combined with proper monitoring and alerting to inform the system operator about the increased latency and possible stale records.

configuration, so you can start it again later from where it left off.
configuration. A Debezium source restarts according to its
[snapshot mode](/content/integrate/redis-data-integration/1.19.1/data-pipelines/pipeline-config.md#choose-a-snapshot-mode)
and the availability of its saved source position.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
and the availability of its saved source position.
and the availability of its saved source position.
If you keep the source stopped for long periods, the stored offset may be removed, making it impossible to resume streaming.

| `initial` (default) | Snapshot when no offset exists, then stream changes. | Resume after a completed snapshot if the position is valid. No automatic snapshot recovery for unavailable log history. | Snapshot, then stream changes. |
| `when_needed` | Snapshot when no offset exists, then stream changes. | Resume if the position is valid. Snapshot again if the connector detects an unavailable position. | Snapshot, then stream changes. |
| `always` | Snapshot on every collector start, then stream changes. | Take a new snapshot even if the position is valid. | Snapshot, then stream changes. |
| `initial_only` | Take an initial snapshot without streaming subsequent changes. | Restart an interrupted initial snapshot; do not capture subsequent changes after it completes. | Snapshot without ongoing change capture. |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be worth noting that using initial_only will cause the collector to enter a crash loop upon completion, causing the source to appear as "not connected" in monitoring.

@@ -459,7 +459,7 @@ redis.wait.retry.delay.ms: 1000
<a name="sourcesadvancedsource"></a>
#### sources\.advanced\.source: Advanced source settings

Advanced configuration properties for the source database connection and CDC behavior. **Applies to the `cdc` and `flink` collector types.**<br/><br/>For the `cdc` collector type, available properties depend on the source database — refer to the relevant Debezium connector documentation: [MySQL](https://debezium.io/documentation/reference/stable/connectors/mysql.html), [MariaDB](https://debezium.io/documentation/reference/stable/connectors/mariadb.html), [PostgreSQL](https://debezium.io/documentation/reference/stable/connectors/postgresql.html), [Oracle](https://debezium.io/documentation/reference/stable/connectors/oracle.html), [SQL Server](https://debezium.io/documentation/reference/stable/connectors/sqlserver.html), [Db2](https://debezium.io/documentation/reference/stable/connectors/db2.html), [MongoDB](https://debezium.io/documentation/reference/stable/connectors/mongodb.html). When using a property from those pages, omit the `debezium.source.` prefix.<br/><br/>**The named properties below cover the most commonly tuned settings: `spanner.*` properties apply to the `flink` collector type, all others apply to the `cdc` collector type. Any other property from the Debezium documentation can still be set as a free-form key-value pair.**
Advanced configuration properties for the source database connection and CDC behavior. **Applies to the `cdc` and `flink` collector types.**<br/><br/>For the `cdc` collector type, available properties depend on the source database — refer to the relevant Debezium connector documentation: [MySQL](https://debezium.io/documentation/reference/stable/connectors/mysql.html), [MariaDB](https://debezium.io/documentation/reference/stable/connectors/mariadb.html), [PostgreSQL](https://debezium.io/documentation/reference/stable/connectors/postgresql.html), [Oracle](https://debezium.io/documentation/reference/stable/connectors/oracle.html), [SQL Server](https://debezium.io/documentation/reference/stable/connectors/sqlserver.html), [Db2](https://debezium.io/documentation/reference/stable/connectors/db2.html), [MongoDB](https://debezium.io/documentation/reference/stable/connectors/mongodb.html). When using a property from those pages, omit the `debezium.source.` prefix.<br/><br/>Set `snapshot.mode` as a free-form source property to control data snapshots. The default is `initial`; available modes and restart behavior depend on the connector. A reset clears the saved position without changing the mode. See [Choose a snapshot mode](/content/integrate/redis-data-integration/1.19.1/data-pipelines/pipeline-config.md#choose-a-snapshot-mode), including the [missed-delete timeline](/content/integrate/redis-data-integration/1.19.1/data-pipelines/pipeline-config.md#missed-deletes).<br/><br/>**The named properties below cover the most commonly tuned settings: `spanner.*` properties apply to the `flink` collector type, all others apply to the `cdc` collector type. Any other property from the Debezium documentation can still be set as a free-form key-value pair.**

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we don't support DB2, we should not have it in this list.

Comment on lines +66 to +71
With `initial` mode, the collector can fail rather than start a new snapshot when the saved
position is unavailable. With `when_needed` mode, it can automatically snapshot the current
selected data and resume streaming. A new snapshot after a restart can therefore
indicate that the source history was no longer available. See
[Choose a snapshot mode](/content/integrate/redis-data-integration/1.19.1/data-pipelines/pipeline-config.md#choose-a-snapshot-mode)
for the connector-specific behavior.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the collector can fail rather than start a new snapshot when the saved position is unavailable. - This leaves it to the reader's interpretation whether this is normal behavior, a problem caused by RDI, or something else.

I recommend adding a note explaining that this is an exceptional situation that may be caused by one of the following (but not only):

  • collector being stopped for a long time, and the change log is removed from the server
  • change in the configuration causing the collector to connect to another server with same data but different offsets
  • changelog being prematurely removed from the server as a part of a cleanup process, while RDI is operational
  • offset missing on the server after a crash and restore

which is expected on first deployment or after a reset.

With `initial` mode, the collector can fail rather than start a new snapshot when the saved
position is unavailable. With `when_needed` mode, it can automatically snapshot the current

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
position is unavailable. With `when_needed` mode, it can automatically snapshot the current
position is unavailable. With `when_needed` mode, it will automatically snapshot the current

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