yuzelin commented on code in PR #1179:
URL: https://github.com/apache/incubator-paimon/pull/1179#discussion_r1199989236
##########
paimon-core/src/main/java/org/apache/paimon/utils/SnapshotManager.java:
##########
@@ -202,7 +211,7 @@ public Optional<Snapshot> latestSnapshotOfUser(String user)
{
return Optional.empty();
}
- private @Nullable Long findLatest() throws IOException {
+ public @Nullable Long findLatest() throws IOException {
Review Comment:
Seems it's not necessary to make it public.
##########
docs/content/maintenance/manage-snapshots.md:
##########
@@ -73,4 +77,57 @@ Please note that too short retain time or too small retain
number may result in:
the batch query takes 10 minutes to read, but the snapshot from 10 minutes
ago
expires, at which point the batch query will read a deleted snapshot.
- Streaming reading jobs on table files (without the external log system) fail
to restart.
- When the job restarts, the snapshot it recorded may have expired.
+ When the job restarts, the snapshot it recorded may have expired. (You can
use
+ [Consumer Id]({{< ref "how-to/querying-tables#consumer-id" >}}) to protect
streaming reading
+ in a small retain time of snapshot expiration).
+
+## Rollback to Snapshot
+
+Rollback a table to a specific snapshot ID.
+
+{{< tabs "rollback-to" >}}
+
+{{< tab "Flink" >}}
+
+Run the following command:
+
+```bash
+<FLINK_HOME>/bin/flink run \
+ /path/to/paimon-flink-action-{{< version >}}.jar \
+ rollback-to \
+ --warehouse <warehouse-path> \
+ --database <database-name> \
+ --table <table-name> \
+ [--snapshot <snapshot-id>]
Review Comment:
`snapshot` is not optional.
##########
docs/content/maintenance/manage-snapshots.md:
##########
@@ -24,7 +24,11 @@ specific language governing permissions and limitations
under the License.
-->
-# Expiring Snapshots
+# Manage Snapshots
+
+This section will describe the management and behavior related to snapshots.
+
+## Expiring Snapshots
Review Comment:
Manage, Expire, Rollback (all not using -ing form)?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]