A question regarding deltas from StoreMaxInt64. I'd have assumed that Operation::Create would be triggered whenever store.max() was called the first time and then subsequently Operation::Update would be triggered whenever store.max() was called with a value greater than the stored one. For example to translate those deltas into database operations. But it seems Operation::Create does get called more often (got errors from the postgres sink that the PK already exists on insert). Is this a bug with the store deltas or intended behaviour?
A question regarding deltas from
StoreMaxInt64
. I'd have assumed thatOperation::Create
would be triggered wheneverstore.max()
was called the first time and then subsequentlyOperation::Update
would be triggered wheneverstore.max()
was called with a value greater than the stored one. For example to translate those deltas into database operations. But it seemsOperation::Create
does get called more often (got errors from the postgres sink that the PK already exists on insert). Is this a bug with the store deltas or intended behaviour?See here for how this is used: https://github.com/pinax-network/substreams/blob/63b7afac64546618baef18ecf203e1c32bce9329/substreams/blocktivity/src/lib.rs#L97-L108