-
Notifications
You must be signed in to change notification settings - Fork 88
Closed
Labels
Description
Say you have a capture and materialization with many bindings that use inferred schemas. When the control plane publishes the inferred schemas, it increases the last_pub_id of the collection. If a user goes into the UI to try to publish the capture or materialization, the collection gets added to the LiveCatalog with a last_pub_id that is potentially greater than the id of the current publication. This results in this error being returned.
Current plan (updated after discussion)
- (Phil/new pub conflicts #1623) Switch to using
last_build_idinstead oflast_pub_idfor optimistic locking - (Phil/new pub conflicts #1623) Introduce the concept of a "touch" publication, which only updates the
built_spec, leaving thespecandlast_pub_idunchanged - (Phil/new pub conflicts #1623) Controllers will hash the
last_pub_ids of all their dependencies in order to determine whether they need to do a touch publication to update their ownbuilt_spec.- This prevents the
last_pub_idfrom being incremented when the dependencies of a spec have changed, thus avoidingExpectPubIdNotMatchederrors caused by that.
- This prevents the
- (Phil/pub conflicts deux #1662) Update the publications handler to always inject the current inferred schema into the models of drafted (non-touch) collections.
- This allows the UI and
flowctlto stop settingexpectPubIdon collection specs. They must set it currently to avoid clobbering inferred schema changes, but this will make clobbering inferred schemas impossible, soexpectPubIdwill no longer be needed.
- This allows the UI and
- (Phil/pub conflicts deux #1662) Update the discovers handler to no longer set
expect_pub_idfor collection specs.- It must still set it for the capture specs, though.
- This avoids the possibility for
expectPubIdconflicts on the collections
- (Phil/pub conflicts deux #1662) Update the publications handler to generate a new
pub_idfor each publication instead of using theidof thepublicationsrow, and to retryPublicationSupersedederrors- Inventing a new
pub_idis what allows us to retry these errors by generating a new (higher)pub_id
- Inventing a new
Reactions are currently unavailable