druid/web-console/src
AmatyaAvadhanula d294404924
Kinesis ingestion with empty shards (#12792)
Kinesis ingestion requires all shards to have at least 1 record at the required position in druid.
Even if this is satisified initially, resharding the stream can lead to empty intermediate shards. A significant delay in writing to newly created shards was also problematic.

Kinesis shard sequence numbers are big integers. Introduce two more custom sequence tokens UNREAD_TRIM_HORIZON and UNREAD_LATEST to indicate that a shard has not been read from and that it needs to be read from the start or the end respectively.
These values can be used to avoid the need to read at least one record to obtain a sequence number for ingesting a newly discovered shard.

If a record cannot be obtained immediately, use a marker to obtain the relevant shardIterator and use this shardIterator to obtain a valid sequence number. As long as a valid sequence number is not obtained, continue storing the token as the offset.

These tokens (UNREAD_TRIM_HORIZON and UNREAD_LATEST) are logically ordered to be earlier than any valid sequence number.

However, the ordering requires a few subtle changes to the existing mechanism for record sequence validation:

The sequence availability check ensures that the current offset is before the earliest available sequence in the shard. However, current token being an UNREAD token indicates that any sequence number in the shard is valid (despite the ordering)

Kinesis sequence numbers are inclusive i.e if current sequence == end sequence, there are more records left to read.
However, the equality check is exclusive when dealing with UNREAD tokens.
2022-08-05 22:38:58 +05:30
..
ace-modes Web console: new Ace, diff view, and cleanup. Decorating the console for the holidays 🎁 (#12085) 2021-12-22 16:31:17 -08:00
blueprint-overrides good stuff (#12435) 2022-04-14 00:23:06 -07:00
bootstrap show json and add search box (#12784) 2022-07-14 17:01:30 -07:00
components show json and add search box (#12784) 2022-07-14 17:01:30 -07:00
dialogs Web console: Misc table fixes (#12489) 2022-05-03 12:08:08 -07:00
druid-models Kinesis ingestion with empty shards (#12792) 2022-08-05 22:38:58 +05:30
hooks Web console: make it possible to namespace local storage, auto flatten spec generator should deal better with bad data (#12238) 2022-02-07 18:52:41 -08:00
react-table Web console: Misc table fixes (#12489) 2022-05-03 12:08:08 -07:00
singletons Web console: Switch to ESLint (#11142) 2021-04-22 19:33:03 -07:00
utils reindex flow should take order from Druid (#12790) 2022-07-14 20:03:33 -07:00
views reindex flow should take order from Druid (#12790) 2022-07-14 20:03:33 -07:00
console-application.scss Web console: improve make type preservation in ingestion configs in the data loader (#10533) 2020-10-30 19:02:44 -07:00
console-application.tsx Web console: add a button to get out of restricted mode, make capability detection more robust (#12503) 2022-05-05 15:06:59 -07:00
entry.scss Web console: Misc table fixes (#12489) 2022-05-03 12:08:08 -07:00
entry.ts Web console: make it possible to namespace local storage, auto flatten spec generator should deal better with bad data (#12238) 2022-02-07 18:52:41 -08:00
links.ts Web console: improve make type preservation in ingestion configs in the data loader (#10533) 2020-10-30 19:02:44 -07:00
setup-tests.ts Web console: Switch to ESLint (#11142) 2021-04-22 19:33:03 -07:00
variables.scss Web console: Misc table fixes (#12489) 2022-05-03 12:08:08 -07:00