github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/execinfrapb/processors_changefeeds.proto (about) 1 // Copyright 2019 The Cockroach Authors. 2 // 3 // Use of this software is governed by the Business Source License 4 // included in the file licenses/BSL.txt. 5 // 6 // As of the Change Date specified in that file, in accordance with 7 // the Business Source License, use of this software will be governed 8 // by the Apache License, Version 2.0, included in the file 9 // licenses/APL.txt. 10 // 11 // Processor definitions for distributed SQL APIs. See 12 // docs/RFCS/distributed_sql.md. 13 // All the concepts here are "physical plan" concepts. 14 15 syntax = "proto2"; 16 // Beware! This package name must not be changed, even though it doesn't match 17 // the Go package name, because it defines the Protobuf message names which 18 // can't be changed without breaking backward compatibility. 19 package cockroach.sql.distsqlrun; 20 option go_package = "execinfrapb"; 21 22 import "jobs/jobspb/jobs.proto"; 23 import "roachpb/data.proto"; 24 import "util/hlc/timestamp.proto"; 25 import "gogoproto/gogo.proto"; 26 27 // ChangeAggregatorSpec is the specification for a processor that watches for 28 // changes in a set of spans. Each span may cross multiple ranges. 29 message ChangeAggregatorSpec { 30 message Watch { 31 optional util.hlc.Timestamp initial_resolved = 1 [(gogoproto.nullable) = false]; 32 optional roachpb.Span span = 2 [(gogoproto.nullable) = false]; 33 } 34 repeated Watch watches = 1 [(gogoproto.nullable) = false]; 35 36 // Feed is the specification for this changefeed. 37 optional cockroach.sql.jobs.jobspb.ChangefeedDetails feed = 2 [(gogoproto.nullable) = false]; 38 } 39 40 // ChangeFrontierSpec is the specification for a processor that receives 41 // span-level resolved timestamps, track them, and emits the changefeed-level 42 // resolved timestamp whenever it changes. 43 message ChangeFrontierSpec { 44 // TrackedSpans is the entire span set being watched. Once all these spans 45 // have been resolved at a certain timestamp, then it's safe to resolve the 46 // changefeed at that timestamp. 47 repeated roachpb.Span tracked_spans = 1 [(gogoproto.nullable) = false]; 48 49 // Feed is the specification for this changefeed. 50 optional cockroach.sql.jobs.jobspb.ChangefeedDetails feed = 2 [(gogoproto.nullable) = false]; 51 52 // JobID is the id of this changefeed in the system jobs. 53 optional int64 job_id = 3 [ 54 (gogoproto.nullable) = false, 55 (gogoproto.customname) = "JobID" 56 ]; 57 }