Skip to content

Commit

Permalink
storage: enable flushable ingestion
Browse files Browse the repository at this point in the history
Add a new cluster version that bumps the Pebble format major version to
FormatFlushableIngest, enabling the use of flushable ingestions. Future work
will introduce a cluster setting allowing disabling flushable ingestions.

Epic: None
Release note: None
Informs cockroachdb#97194.
  • Loading branch information
jbowens committed Mar 15, 2023
1 parent a36d88b commit d22420f
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/generated/settings/settings-for-tenants.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,4 +299,4 @@ trace.opentelemetry.collector string address of an OpenTelemetry trace collecto
trace.snapshot.rate duration 0s if non-zero, interval at which background trace snapshots are captured
trace.span_registry.enabled boolean true if set, ongoing traces can be seen at https://<ui>/#/debug/tracez
trace.zipkin.collector string the address of a Zipkin instance to receive traces, as <host>:<port>. If no port is specified, 9411 will be used.
version version 1000022.2-80 set the active cluster version in the format '<major>.<minor>'
version version 1000022.2-82 set the active cluster version in the format '<major>.<minor>'
2 changes: 1 addition & 1 deletion docs/generated/settings/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,6 @@
<tr><td><div id="setting-trace-snapshot-rate" class="anchored"><code>trace.snapshot.rate</code></div></td><td>duration</td><td><code>0s</code></td><td>if non-zero, interval at which background trace snapshots are captured</td></tr>
<tr><td><div id="setting-trace-span-registry-enabled" class="anchored"><code>trace.span_registry.enabled</code></div></td><td>boolean</td><td><code>true</code></td><td>if set, ongoing traces can be seen at https://&lt;ui&gt;/#/debug/tracez</td></tr>
<tr><td><div id="setting-trace-zipkin-collector" class="anchored"><code>trace.zipkin.collector</code></div></td><td>string</td><td><code></code></td><td>the address of a Zipkin instance to receive traces, as &lt;host&gt;:&lt;port&gt;. If no port is specified, 9411 will be used.</td></tr>
<tr><td><div id="setting-version" class="anchored"><code>version</code></div></td><td>version</td><td><code>1000022.2-80</code></td><td>set the active cluster version in the format &#39;&lt;major&gt;.&lt;minor&gt;&#39;</td></tr>
<tr><td><div id="setting-version" class="anchored"><code>version</code></div></td><td>version</td><td><code>1000022.2-82</code></td><td>set the active cluster version in the format &#39;&lt;major&gt;.&lt;minor&gt;&#39;</td></tr>
</tbody>
</table>
2 changes: 1 addition & 1 deletion pkg/cli/testdata/declarative-rules/deprules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dep
----
debug declarative-print-rules 1000022.2-80 dep
debug declarative-print-rules 1000022.2-82 dep
deprules
----
- name: 'CheckConstraint transitions to ABSENT uphold 2-version invariant: PUBLIC->VALIDATED'
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/testdata/declarative-rules/oprules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
op
----
debug declarative-print-rules 1000022.2-80 op
debug declarative-print-rules 1000022.2-82 op
rules
----
[]
8 changes: 8 additions & 0 deletions pkg/clusterversion/cockroach_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,10 @@ const (
// progress of each job in the system.jobs table.
V23_1JobInfoTableIsBackfilled

// V23_1EnableFlushableIngest upgrades the Pebble format major version to
// FormatFlushableIngest, which enables use of flushable ingestion.
V23_1EnableFlushableIngest

// *************************************************
// Step (1): Add new versions here.
// Do not add new versions to a patch release.
Expand Down Expand Up @@ -837,6 +841,10 @@ var rawVersionsSingleton = keyedVersions{
Key: V23_1JobInfoTableIsBackfilled,
Version: roachpb.Version{Major: 22, Minor: 2, Internal: 80},
},
{
Key: V23_1EnableFlushableIngest,
Version: roachpb.Version{Major: 22, Minor: 2, Internal: 82},
},

// *************************************************
// Step (2): Add new versions here.
Expand Down
3 changes: 3 additions & 0 deletions pkg/storage/pebble.go
Original file line number Diff line number Diff line change
Expand Up @@ -2028,6 +2028,9 @@ func (p *Pebble) SetMinVersion(version roachpb.Version) error {
var formatVers pebble.FormatMajorVersion
// Cases are ordered from newer to older versions.
switch {
case !version.Less(clusterversion.ByKey(clusterversion.V23_1EnableFlushableIngest)):
formatVers = pebble.FormatFlushableIngest

case !version.Less(clusterversion.ByKey(clusterversion.V23_1EnsurePebbleFormatSSTableValueBlocks)):
formatVers = pebble.FormatSSTableValueBlocks

Expand Down

0 comments on commit d22420f

Please sign in to comment.