Module mz_storage::render::upsert
source · Modules
- memory 🔒Allow usage of
std::collections::HashMap
. We need to iterate through all the values in the map, so we can’t usemz_ore
wrapper. Also, we don’t need any ordering for the values fetched, so using std HashMap. - rocksdb 🔒
- types 🔒This module defines the
UpsertStateBackend
trait and various implementations. This trait is the way theupsert
operator interacts with various state backings.
Structs
Constants
- A thread-local datum cache used to calculate hashes
Traits
Functions
- Helper method for
upsert_inner
used to stagedata
updates from the input timely edge. - Emit the given error, and stall till the dataflow is restarted.
- This leaf operator drops
token
after the input reaches theresume_upper
. This is useful to take coordinated actions across all workers, after theupsert
operator has rehydrated. - Helper method for
upsert_inner
used to stagedata
updates from the input timely edge. - upsert 🔒Resumes an upsert computation at
resume_upper
given as inputs a collection of upsert commands and the collection of the previous output of this operator. Returns a tuple of
Type Aliases
- KeyHash 🔒The hash function used to map upsert keys. It is important that this hash is a cryptographic hash so that there is no risk of collisions. Collisions on SHA256 have a probability of 2^128 which is many orders of magnitude smaller than many other events that we don’t even think about (e.g bit flips). In short, we can safely assume that sha256(a) == sha256(b) iff a == b.