OpenSearch/x-pack/docs/en/rest-api/rollup
Zachary Tong fc9fb64ad5
[Rollup] Improve ID scheme for rollup documents (#32558)
Previously, we were using a simple CRC32 for the IDs of rollup documents.
This is a very poor choice however, since 32bit IDs leads to collisions
between documents very quickly.

This commit moves Rollups over to a 128bit ID.  The ID is a concatenation
of all the keys in the document (similar to the rolling CRC before),
hashed with 128bit Murmur3, then base64 encoded.  Finally, the job
ID and a delimiter (`$`) are prepended to the ID.

This gurantees that there are 128bits per-job.  128bits should
essentially remove all chances of collisions, and the prepended
job ID means that _if_ there is a collision, it stays "within"
the job.

BWC notes:

We can only upgrade the ID scheme after we know there has been a good
checkpoint during indexing.  We don't rely on a STARTED/STOPPED
status since we can't guarantee that resulted from a real checkpoint,
or other state.  So we only upgrade the ID after we have reached
a checkpoint state during an active index run, and only after the
checkpoint has been confirmed.

Once a job has been upgraded and checkpointed, the version increments
and the new ID is used in the future.  All new jobs use the
new ID from the start
2018-08-03 11:13:25 -04:00
..
delete-job.asciidoc [Docs] All Rollup docs experimental, agg limitations, clarify DeleteJob (#31299) 2018-06-13 15:42:20 -04:00
get-job.asciidoc [Rollup] Improve ID scheme for rollup documents (#32558) 2018-08-03 11:13:25 -04:00
put-job.asciidoc [Docs] All Rollup docs experimental, agg limitations, clarify DeleteJob (#31299) 2018-06-13 15:42:20 -04:00
rollup-caps.asciidoc [DOCS] Rollup Caps API incorrectly mentions GET Jobs API (#32280) 2018-07-24 10:23:13 +01:00
rollup-index-caps.asciidoc [Rollup] Add new capabilities endpoint for concrete rollup indices (#30401) 2018-07-16 17:20:50 -04:00
rollup-job-config.asciidoc [Docs] All Rollup docs experimental, agg limitations, clarify DeleteJob (#31299) 2018-06-13 15:42:20 -04:00
rollup-search.asciidoc [Docs] All Rollup docs experimental, agg limitations, clarify DeleteJob (#31299) 2018-06-13 15:42:20 -04:00
start-job.asciidoc [Docs] All Rollup docs experimental, agg limitations, clarify DeleteJob (#31299) 2018-06-13 15:42:20 -04:00
stop-job.asciidoc [Docs] All Rollup docs experimental, agg limitations, clarify DeleteJob (#31299) 2018-06-13 15:42:20 -04:00