Skip to content

Commit e0796d0

Browse files
authored
Merge pull request #268 from marklogic/feature/timestamp-docs
Adding docs for enabling point-in-time queries
2 parents e4e7660 + 69b0c9d commit e0796d0

File tree

3 files changed

+69
-0
lines changed

3 files changed

+69
-0
lines changed

docs/export/export-archives.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,29 @@ included with the `--categories` option. This option accepts a comma-delimited s
8282

8383
If the option is not included, all metadata will be included.
8484

85+
## Enabling point-in-time queries
86+
87+
Flux depends on MarkLogic's support for
88+
[point-in-time queries](https://docs.marklogic.com/11.0/guide/app-dev/point_in_time#id_47946) when querying for
89+
documents, thus ensuring a [consistent snapshot of data](https://docs.marklogic.com/guide/java/data-movement#id_18227).
90+
Point-in-time queries depend on the same MarkLogic system timestamp being used for each query. Because system timestamps
91+
can be deleted when MarkLogic [merges data](https://docs.marklogic.com/11.0/guide/admin-guide/en/understanding-and-controlling-database-merges.html),
92+
you may encounter the following error that causes an export command to fail:
93+
94+
```
95+
Server Message: XDMP-OLDSTAMP: Timestamp too old for forest
96+
```
97+
98+
To resolve this issue, you must
99+
[enable point-in-time queries](https://docs.marklogic.com/11.0/guide/app-dev/point_in_time#id_32468) for your database
100+
by configuring the `merge timestamp` setting. The recommended practice is to
101+
[use a negative value](https://docs.marklogic.com/11.0/guide/admin-guide/en/understanding-and-controlling-database-merges/setting-a-negative-merge-timestamp-to-preserve-fragments-for-a-rolling-window-of-time.html)
102+
that exceeds the expected duration of the export operation. For example, a value of `-864,000,000,000` for the merge
103+
timestamp would give the export operation 24 hours to complete.
104+
105+
Flux will soon include an option to not use a snapshot for queries for when the risk of inconsistent results is deemed
106+
to be acceptable.
107+
85108
## Transforming document content
86109

87110
You can apply a [MarkLogic REST transform](https://docs.marklogic.com/guide/rest-dev/transforms)

docs/export/export-documents.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,29 @@ you use for running Flux to break the value into multiple lines:
122122
For queries expressed in XML, you may find it easier to use single quotes instead of double quotes, as single quotes
123123
do not require any escaping.
124124

125+
## Enabling point-in-time queries
126+
127+
Flux depends on MarkLogic's support for
128+
[point-in-time queries](https://docs.marklogic.com/11.0/guide/app-dev/point_in_time#id_47946) when querying for
129+
documents, thus ensuring a [consistent snapshot of data](https://docs.marklogic.com/guide/java/data-movement#id_18227).
130+
Point-in-time queries depend on the same MarkLogic system timestamp being used for each query. Because system timestamps
131+
can be deleted when MarkLogic [merges data](https://docs.marklogic.com/11.0/guide/admin-guide/en/understanding-and-controlling-database-merges.html),
132+
you may encounter the following error that causes an export command to fail:
133+
134+
```
135+
Server Message: XDMP-OLDSTAMP: Timestamp too old for forest
136+
```
137+
138+
To resolve this issue, you must
139+
[enable point-in-time queries](https://docs.marklogic.com/11.0/guide/app-dev/point_in_time#id_32468) for your database
140+
by configuring the `merge timestamp` setting. The recommended practice is to
141+
[use a negative value](https://docs.marklogic.com/11.0/guide/admin-guide/en/understanding-and-controlling-database-merges/setting-a-negative-merge-timestamp-to-preserve-fragments-for-a-rolling-window-of-time.html)
142+
that exceeds the expected duration of the export operation. For example, a value of `-864,000,000,000` for the merge
143+
timestamp would give the export operation 24 hours to complete.
144+
145+
Flux will soon include an option to not use a snapshot for queries for when the risk of inconsistent results is deemed
146+
to be acceptable.
147+
125148
## Transforming document content
126149

127150
You can apply a [MarkLogic REST transform](https://docs.marklogic.com/guide/rest-dev/transforms)

docs/export/export-rdf.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,26 @@ graph value that will then be associated with every triple that Flux writes to a
8989
## gzip compression
9090

9191
To compress each file written by Flux using gzip, simply include `--gzip` as an option.
92+
93+
## Enabling point-in-time queries
94+
95+
Flux depends on MarkLogic's support for
96+
[point-in-time queries](https://docs.marklogic.com/11.0/guide/app-dev/point_in_time#id_47946) when querying for
97+
documents containing RDF data, thus ensuring a [consistent snapshot of data](https://docs.marklogic.com/guide/java/data-movement#id_18227).
98+
Point-in-time queries depend on the same MarkLogic system timestamp being used for each query. Because system timestamps
99+
can be deleted when MarkLogic [merges data](https://docs.marklogic.com/11.0/guide/admin-guide/en/understanding-and-controlling-database-merges.html),
100+
you may encounter the following error that causes an export command to fail:
101+
102+
```
103+
Server Message: XDMP-OLDSTAMP: Timestamp too old for forest
104+
```
105+
106+
To resolve this issue, you must
107+
[enable point-in-time queries](https://docs.marklogic.com/11.0/guide/app-dev/point_in_time#id_32468) for your database
108+
by configuring the `merge timestamp` setting. The recommended practice is to
109+
[use a negative value](https://docs.marklogic.com/11.0/guide/admin-guide/en/understanding-and-controlling-database-merges/setting-a-negative-merge-timestamp-to-preserve-fragments-for-a-rolling-window-of-time.html)
110+
that exceeds the expected duration of the export operation. For example, a value of `-864,000,000,000` for the merge
111+
timestamp would give the export operation 24 hours to complete.
112+
113+
Flux will soon include an option to not use a snapshot for queries for when the risk of inconsistent results is deemed
114+
to be acceptable.

0 commit comments

Comments
 (0)