-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli/demo,cdc: enable rangefeeds by default
Fixes #82719, which made it annoying to run changefeeds in cockroach demo as you need to enable rangefeeds twice, once at the system level. Now cockroach demo enables rangefeeds at startup. You can override this behavior for performance or to demo the process of enabling rangefeeds with the flag `--auto-enable-rangefeeds=false`. Release note (cli change): cockroach demo now enables rangefeeds by default. You can restore the old behavior with --auto-enable-rangefeeds=false.
- Loading branch information
Showing
8 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#! /usr/bin/env expect -f | ||
|
||
source [file join [file dirname $argv0] common.tcl] | ||
|
||
start_test "Demo core changefeed using format=csv" | ||
spawn $argv demo --format=csv | ||
|
||
# We should start in a populated database. | ||
eexpect "movr>" | ||
|
||
# initial_scan=only prevents the changefeed from hanging waiting for more changes. | ||
send "CREATE CHANGEFEED FOR users WITH initial_scan='only';\r" | ||
|
||
# header for the results of a successful changefeed | ||
eexpect "table,key,value" | ||
|
||
send_eof | ||
eexpect eof | ||
|
||
end_test | ||
|
||
start_test "Demo with rangefeeds disabled as they are in real life" | ||
spawn $argv demo --format=csv --auto-enable-rangefeeds=false | ||
|
||
# We should start in a populated database. | ||
eexpect "movr>" | ||
|
||
# initial_scan=only prevents the changefeed from hanging waiting for more changes. | ||
send "CREATE CHANGEFEED FOR users WITH initial_scan='only';\r" | ||
|
||
# changefeed should fail fast with an informative error. | ||
eexpect "ERROR: rangefeeds require the kv.rangefeed.enabled setting." | ||
|
||
send_eof | ||
eexpect eof | ||
|
||
end_test |