Permalink
Checking mergeability…
Don’t worry, you can still create the pull request.
jordanlewis
Jordan Lewis
benesch
Nikhil Benesch
benesch
Nikhil Benesch
benesch
Nikhil Benesch
jordanlewis
Jordan Lewis
jordanlewis
Jordan Lewis
jordanlewis
Jordan Lewis
jordanlewis
Jordan Lewis
jordanlewis
Jordan Lewis
dt
David Taylor
dt
David Taylor
dt
David Taylor
benesch
Nikhil Benesch
benesch
Nikhil Benesch
benesch
Nikhil Benesch
benesch
Nikhil Benesch
Comparing changes
Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also
.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a Base Repository
cockroachdb/cockroach
AALEKH/cockroach
Abioy/cockroach
AflenChen/cockroach
Arifur794/cockroach
CodEnFisH/cockroach
DilipLukose/cockroach
El-Coder/cockroach
Frank-Jin/cockroach
GavinHwa/cockroach
GokulSrinivas/cockroach
GrayMissing/cockroach
HanumathRao/cockroach
HengWang/cockroach
HunterChen/cockroach
InsaneYoungStunner/cockroach
Kevin-GuanJian/cockroach
Linicks/cockroach
PragashSiva/cockroach
RaduBerinde/cockroach
SandyZeng/cockroach
Viewtiful/cockroach
XuWanHong/cockroach-1
Zemnmez/cockroach
a-robinson/cockroach
abhishekgahlot/cockroach
alex/cockroach
alisheikh/cockroach
anchal-agrawal/cockroach
andradeandrey/cockroach
angel1991521/cockroach
ansonism/cockroach
axfcampos/cockroach
banks/cockroach
bdarnell/cockroach
bdotdub/cockroach
bigrats/cockroach
bigxing/cockroach
bobpattersonjr/cockroach
bowlofstew/cockroach
brandenyoon/cockroach
briliant1991/cockroach
bussiere/cockroach
bydsky/cockroach
cDoru/cockroach
cainiao1989/cockroach
cdsalmons/cockroach
chagge/cockroach
chunshengster/cockroach
cleverdeng/cockroach
clm971910/cockroach
cn15810092493/cockroach
connecteev/cockroach
dallasmarlow/cockroach
darkseed/cockroach
db-production/cockroach
dfrsg/cockroach
diegode/cockroach
domluna/cockroach
eagle518/cockroach
easyfmxu/cockroach
eclectice/cockroach
elvin-du/cockroach
embark/cockroach
erriapo/cockroach
es-chow/cockroach
esaul/cockroach
flyingliang/cockroach
gaowenbin/cockroach
ghostsun/cockroach
gqf2008/cockroach
grimreaper/cockroach
gstarnberger/cockroach
gude/cockroach
guiquanz/cockroach
hannibalhuang/cockroach
hanshenu/cockroach
hanwoody/cockroach
hcxiong/cockroach
hollis/cockroach
hubt/cockroach
hunslater/cockroach
iamima/cockroach
icattlecoder/cockroach
ikarzali/cockroach
ilovejs/cockroach
jackylk/cockroach
jamesgraves/cockroach
jamiepg1/cockroach
jay23jack/cockroach
jess-edwards/cockroach
jinguoxing/cockroach
jmank88/cockroach
joezxy/cockroach
joliny/cockroach
jonathanmarvens/cockroach
josephwinston/cockroach
josephyzhou/cockroach
joshuawatson/cockroach
jrcjc123/cockroach
jsanc623/cockroach
kanasite/cockroach
kebohiki/cockroach
kkaneda/cockroach
kortschak/cockroach
kritivasas/cockroach
kuguobing/cockroach
lemonhall/cockroach
leomzhong/cockroach
lessc0de/cockroach
lianhuiwang/cockroach
liuzongquan/cockroach
lostz/cockroach
lshmouse/cockroach
luan-cestari/cockroach
lupengfeige/cockroach
mabdullah353/cockroach
mackjoner/cockroach
maniksurtani/cockroach
manithnuon/cockroach
markreg/cockroach
matadorhong/cockroach
meshileya/cockroach
mindis/cockroach
mixiong/cockroach
mjibson/cockroach
mobilipia/cockroach
mohae/cockroach
mrunix/cockroach
msmakhlouf/cockroach
nanderoo/cockroach
neuroradiology/cockroach
neutony/cockroach
nikelius/cockroach
nimishzynga/cockroach
nkgfirecream/cockroach
nmarasoiu/cockroach
ofonimefrancis/cockroach
oldmantaiter/cockroach
ollyblue/cockroach
petermattis/cockroach
picolonet/storage
pinterb/cockroach
pramendra/cockroach
putaozhuose/cockroach
r00tjimmy/cockroach
ramgtv/cockroach
rayleyva/cockroach
sandeepmukho/cockroach
sawanoboly/cockroach
scrooph/cockroach
sdboyer/cockroach
shafiahmed/cockroach
shanyechen/cockroach
shilezi/cockroach
silky/cockroach
slavau/cockroach
sunya123/cockroach
superneo/cockroach
swarbiv/cockroach
sxhao/cockroach
tamird/cockroach
therob3000/cockroach
timwee/cockroach
tml/cockroach
tomzhang/cockroach
toshisam/cockroach
trebogeer/cockroach
treemantris/cockroach
tristartom/cockroach
truthwzl/cockroach
tschottdorf/cockroach
udybrill/cockroach
umegaya/cockroach
vikram/cockroach
vivekmenezes/cockroach
vvydier/cockroach
waderly/cockroach
walkingsparrow/cockroach
wangtuanjie/cockroach
wheelcomplex/cockroach
willmadison/cockroach
wulinjun4/cockroach
wuyu201321060203/cockroach
wycg1984/cockroach
xiaoyulei/cockroach
yacki/cockroach
yananzhi/cockroach
yangyaoweng/cockroach
yanniyang/cockroach
yekeqiang/cockroach
yemaocheng/cockroach
yonglehou/cockroach
zeeshanali/cockroach
zhaixuezhong/cockroach
zhangchn/cockroach
zhanglei/cockroach
zhonghai/cockroach
zimmermamc/cockroach
zofuthan/cockroach
Nothing to show
Choose a Head Repository
cockroachdb/cockroach
AALEKH/cockroach
Abioy/cockroach
AflenChen/cockroach
Arifur794/cockroach
CodEnFisH/cockroach
DilipLukose/cockroach
El-Coder/cockroach
Frank-Jin/cockroach
GavinHwa/cockroach
GokulSrinivas/cockroach
GrayMissing/cockroach
HanumathRao/cockroach
HengWang/cockroach
HunterChen/cockroach
InsaneYoungStunner/cockroach
Kevin-GuanJian/cockroach
Linicks/cockroach
PragashSiva/cockroach
RaduBerinde/cockroach
SandyZeng/cockroach
Viewtiful/cockroach
XuWanHong/cockroach-1
Zemnmez/cockroach
a-robinson/cockroach
abhishekgahlot/cockroach
alex/cockroach
alisheikh/cockroach
anchal-agrawal/cockroach
andradeandrey/cockroach
angel1991521/cockroach
ansonism/cockroach
axfcampos/cockroach
banks/cockroach
bdarnell/cockroach
bdotdub/cockroach
bigrats/cockroach
bigxing/cockroach
bobpattersonjr/cockroach
bowlofstew/cockroach
brandenyoon/cockroach
briliant1991/cockroach
bussiere/cockroach
bydsky/cockroach
cDoru/cockroach
cainiao1989/cockroach
cdsalmons/cockroach
chagge/cockroach
chunshengster/cockroach
cleverdeng/cockroach
clm971910/cockroach
cn15810092493/cockroach
connecteev/cockroach
dallasmarlow/cockroach
darkseed/cockroach
db-production/cockroach
dfrsg/cockroach
diegode/cockroach
domluna/cockroach
eagle518/cockroach
easyfmxu/cockroach
eclectice/cockroach
elvin-du/cockroach
embark/cockroach
erriapo/cockroach
es-chow/cockroach
esaul/cockroach
flyingliang/cockroach
gaowenbin/cockroach
ghostsun/cockroach
gqf2008/cockroach
grimreaper/cockroach
gstarnberger/cockroach
gude/cockroach
guiquanz/cockroach
hannibalhuang/cockroach
hanshenu/cockroach
hanwoody/cockroach
hcxiong/cockroach
hollis/cockroach
hubt/cockroach
hunslater/cockroach
iamima/cockroach
icattlecoder/cockroach
ikarzali/cockroach
ilovejs/cockroach
jackylk/cockroach
jamesgraves/cockroach
jamiepg1/cockroach
jay23jack/cockroach
jess-edwards/cockroach
jinguoxing/cockroach
jmank88/cockroach
joezxy/cockroach
joliny/cockroach
jonathanmarvens/cockroach
josephwinston/cockroach
josephyzhou/cockroach
joshuawatson/cockroach
jrcjc123/cockroach
jsanc623/cockroach
kanasite/cockroach
kebohiki/cockroach
kkaneda/cockroach
kortschak/cockroach
kritivasas/cockroach
kuguobing/cockroach
lemonhall/cockroach
leomzhong/cockroach
lessc0de/cockroach
lianhuiwang/cockroach
liuzongquan/cockroach
lostz/cockroach
lshmouse/cockroach
luan-cestari/cockroach
lupengfeige/cockroach
mabdullah353/cockroach
mackjoner/cockroach
maniksurtani/cockroach
manithnuon/cockroach
markreg/cockroach
matadorhong/cockroach
meshileya/cockroach
mindis/cockroach
mixiong/cockroach
mjibson/cockroach
mobilipia/cockroach
mohae/cockroach
mrunix/cockroach
msmakhlouf/cockroach
nanderoo/cockroach
neuroradiology/cockroach
neutony/cockroach
nikelius/cockroach
nimishzynga/cockroach
nkgfirecream/cockroach
nmarasoiu/cockroach
ofonimefrancis/cockroach
oldmantaiter/cockroach
ollyblue/cockroach
petermattis/cockroach
picolonet/storage
pinterb/cockroach
pramendra/cockroach
putaozhuose/cockroach
r00tjimmy/cockroach
ramgtv/cockroach
rayleyva/cockroach
sandeepmukho/cockroach
sawanoboly/cockroach
scrooph/cockroach
sdboyer/cockroach
shafiahmed/cockroach
shanyechen/cockroach
shilezi/cockroach
silky/cockroach
slavau/cockroach
sunya123/cockroach
superneo/cockroach
swarbiv/cockroach
sxhao/cockroach
tamird/cockroach
therob3000/cockroach
timwee/cockroach
tml/cockroach
tomzhang/cockroach
toshisam/cockroach
trebogeer/cockroach
treemantris/cockroach
tristartom/cockroach
truthwzl/cockroach
tschottdorf/cockroach
udybrill/cockroach
umegaya/cockroach
vikram/cockroach
vivekmenezes/cockroach
vvydier/cockroach
waderly/cockroach
walkingsparrow/cockroach
wangtuanjie/cockroach
wheelcomplex/cockroach
willmadison/cockroach
wulinjun4/cockroach
wuyu201321060203/cockroach
wycg1984/cockroach
xiaoyulei/cockroach
yacki/cockroach
yananzhi/cockroach
yangyaoweng/cockroach
yanniyang/cockroach
yekeqiang/cockroach
yemaocheng/cockroach
yonglehou/cockroach
zeeshanali/cockroach
zhaixuezhong/cockroach
zhangchn/cockroach
zhanglei/cockroach
zhonghai/cockroach
zimmermamc/cockroach
zofuthan/cockroach
Nothing to show
36
contributors
This comparison is big! We’re only showing the most recent
250
commits
Commits on Oct 03, 2018
log: include a call to action with fatal errors
When rare errors happen in the wild, they are a) often unreported or b) reported only in anonymized form, with little context that can help pinpoint the root cause. Users can help us out tremendously by contacting us, and so we should incentivize that. Do so by concluding fatal errors (i.e. most crashes) with a call to action. Touches #28699. Touches #24033. Touches #25173. Release note: None
Merge pull request #30920 from nvanbenschoten/backport2.1-30909
release-2.1: storage: grab RLock in Replica.propose when checking destroyStatus
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #30921 from a-robinson/backport2.1-30907
release-2.1: storage: Avoid printing writes-per-second info to logs and rangelog
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
core: fix and add test for per locality hosts
Connected the existing code and added an acceptance roachtest. closes: 29591 Release note: None
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
security: use same error message for user DNE and bad password
This prevents attacks to determine which users exist. Fixes #30879 Release note (bug fix): "user does not exist" and "invalid password" errors now produce the same error message during password login.
Loading status checks…
Merge pull request #30903 from danhhz/backport2.1-30896
release-2.1: changefeedccl: fix panic when pk is updated and a column is not nullable
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
sql: remove depreceted config_yaml field from output
Since `cockroach zone` is a deprecated command and we no longer support the YAML method to configure zones, we shouldn't show the YAML in the output at all for `SHOW ALL ZONE CONFIGURATIONS` and for `SHOW ZONE CONFIGURATION FOR ...`. For backwards compatibility, we can not remove the column all together yet so instead make the column hidden. Release note: None
Loading status checks…
Commits on Oct 04, 2018
cli/sql: avoid a panic upon initial session errors
Prior to this patch, if the server closed the connection (because of some internal error) in-between the initial pq.Open() and the middle of conn.getServerMetaData(), the client conn object would become invalid. However this error case was turned into a warning and subsequent accesses by the client code would then in turn into a panic (instead of a clean "connection error"). This patch fixes this by ensuring the connection is properly cleaned up if the intermediate SQL query in getServerMetadata() fails. Release note: None
Loading status checks…
cli/start,server: fix the "wait for init" msg
Release note (bug fix): Previously `cockroach start` would erroneously hint that it was waiting for a join or `cockroach init` both for fresh new nodes and re-starting nodes. This has been fixed and the message now only appears for fresh new nodes.
Loading status checks…
Merge pull request #30952 from knz/backport2.1-30688
release-2.1: cli/sql: avoid a panic upon initial session errors
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #30953 from knz/backport2.1-30211
release-2.1: cli/start,server: fix the "wait for init" msg
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #30892 from vilterp/backport2.1-30842
release-2.1: ui: add semicolon to CREATE USER command on login screen
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
craig[bot]
and
ridwanmsharif
Merge #30937
30937: release-2.1: sql: remove depreceted config_yaml field from output r=ridwanmsharif a=ridwanmsharif Backport 1/1 commits from #30927. /cc @cockroachdb/release --- Since `cockroach zone` is a deprecated command and we no longer support the YAML method to configure zones, we shouldn't show the YAML in the output at all for `SHOW ALL ZONE CONFIGURATIONS` and for `SHOW ZONE CONFIGURATION FOR ...`. For backwards compatibility, we can not remove the column all together yet so instead make the column hidden. Release note: None Co-authored-by: Ridwan Sharif <ridwan@cockroachlabs.com>
Loading status checks…
opt: fix crash caused by tuple IN tuples
Some of the constraint generation code relies on the values in the right-hand side tuple of an IN expression being sorted (which is done by NormalizeInConst). However, this rule does not sort tuples of tuples. Fixing the code to call `spans.MergeAndSort`. Note that this function has a fast-path if the spans are already sorted. Release note (bug fix): Fixed a possible crash when using filters with "tuple IN tuples" expressions.
Loading status checks…
storage: Add minimum cluster version for load-based rebalancing
This is needed because v2.0 didn't gossip QPS data, so in a mixed-version cluster the 2.1 nodes will think all the 2.0 nodes have no load on them and continually try to give them more leases and replicas. Gossiping QPS data was added in #27857. Release note: None
Loading status checks…
Merge pull request #30971 from a-robinson/backport2.1-30964
release-2.1: storage: Add minimum cluster version for load-based rebalancing
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #30968 from RaduBerinde/backport2.1-30958
release-2.1: opt: fix crash caused by tuple IN tuples
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
partitionccl: Clarify license check error when setting zone configs
Fixes #30960 in the laziest way possible. We could presumably also scan through the subzones to determine whether they're for indexes, partitions, or both, but this seems clear enough for people to understand. Release note: None
Loading status checks…
storage: Don't transfer leases to behind replicas in StoreRebalancer
Transferring a lease to a replica that's behind can cause all requests to the range to stall, as the old leaseholder thinks it's no longer the leaseholder but the new leaseholder doesn't know it's the leaseholder yet. This avoids creating such scenarios in the StoreRebalancer. Release note (bug fix): Avoids an edge case in load-based rebalancing where we could transfer the lease for a range to a replica that isn't keeping up with the other replicas, causing brief periods where no replicas think they're leaseholder for the range and thus no requests can be processed for the range.
Loading status checks…
Merge pull request #30978 from a-robinson/backport2.1-30962
release-2.1: partitionccl: Clarify license check error when setting zone configs
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Commits on Oct 05, 2018
Merge pull request #30922 from tschottdorf/backport2.1-30822-30898-30918
backport-2.1: log: include a call to action with fatal errors
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
sql: improve the table name prefix resolution error message
Before: ``` root@127.0.0.1:44824/defaultdb> create table t.t(x int); pq: no schema has been selected to create "t.t" in HINT: verify that the current database and search_path are valid ``` After: ``` root@127.0.0.1:36392/defaultdb> create table t.t(x int); pq: cannot create "t.t" because the target database or schema does not exist HINT: verify that the current database and search_path are valid and/or the target database exists ``` Release note: None
Loading status checks…
Merge pull request #30454 from knz/backport2.1-29623
release-2.1: sql: improve the table name prefix resolution error message
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #30972 from a-robinson/backport2.1-30938
release-2.1: storage: Don't transfer leases to behind replicas in StoreRebalancer
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
changefeedccl: support a minimum frequency between resolved ts emits
The `WITH resolved` option now take an optional duration which is used as a lower bound on the duration between emitted resolved timestamps. It accepts any format that https://golang.org/pkg/time/#ParseDuration does. (e.g. `WITH resolved='10s'`). If unspecified, the previous behavior of emitting all resolved timestamps is used. `resolved` is now the first `WITH` option to optionally take a value, so this required a small refactor to make an enum from the bool specifing whether the value was required. Closes #30367 Release note (enterprise change): CHANGEFEEDs can now be configured with a minimum duration between emitted resolved timestamps.
Loading status checks…
sql: present the output of SHOW JOBS in sorted order
Requested by @rolandcrosby and @a-robinson. Release note (sql change): The output of `SHOW JOBS` now reports ongoing jobs first in start time order, then completed jobs in finished time order.
Loading status checks…
Merge pull request #31005 from knz/backport2.1-30917
release-2.1: sql: present the output of SHOW JOBS in sorted order
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
rpc/nodedialer: reset conn breaker after succesful connection
`Dialer.DialInternalClient` does not check the circuit breaker but blindly attempts a connection and can succeed, leaving the system in a state where there is a healthy connection to a node, but the circuit breaker used for dialing is open. DistSQL checks for connection health when scheduling processors, but the connection health check does not examine the breaker. So DistSQL will proceed to schedule a processor on a node but then be unable to use the connection to that node because `Dialer.Dial` will return with a `breaker open` error. The code contains a TODO to reconcile the handling of circuit breakers in the various `Dialer` methods, but changing the handling is risky in the short term. As a stop-gap, we reset the breaker after a connection is successfully opened. Fixes #29149 Release note: None
sql: consider conn circuit breakers in distsql planning
Change `DistSQLPlanner.checkNodeHealth` so that it uses `nodedialer.Dialer.ConnHealth` instead of `rpc.Context.ConnHealth`. The former is the right method to be calling to check a node's connection health. Refactor `DistSQLPlanner.checkNodeHealth` into a `distSQLNodeHealth` struct. This removed the need for `DistSQLPlannerTestingKnobs`. Enhance `nodedialer.Dialer.ConnHealth` to mark connections as unhealthy if the circuit breaker is open. This prevents DistSQL from planning processors on such nodes. Release note: None
Loading status checks…
Merge pull request #31014 from petermattis/backport2.1-30987
release-2.1: sql,rpc/nodedialer: improve distsql node health checks
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
andreimatei
and knz
sql, pgwire: cancel sessions better
Before this patch, `cancel session <foo>` would cause a connExecutor's context to be canceled. This patch switches it to cancel the pgwire connection's ctx instead (which was a parent of the connExecutor's ctx; now the two are the same), as nature intended. For example, reading from the network connection should stop ASAP after `cancel session`. It also opens to door to guaranteeing that the client using the respective session is unblocked in a timely manner (by the server closing the network connection), although that is not currently implemented (pgwire will still wait for the connExecutor to react to cancelation and finish its task before closing the net.Conn). This patch also eliminates what I presume to have been a crash when someone tries to cancel a "session" created by the InternalExecutor. It will now be a no-op. This patch also moves a cancelation callback out of connExecutor.ctxHolder. I'm trying to get rid of that guy, which is how this patch came to be. I've also added a TODO with some thoughts on a better design for session cancelation, originally expressed in #23861 (comment). FWIW, I've tried to be the change, but gave up for the moment. Release note: None
sql: properly ignore invalid chars in encoding names
Release note (bug fix): CockroachDB now properly ignores non-alphanumeric characters in encoding names passed to `convert_from()`, `client_encoding`, etc., for compatibility with PostgreSQL.
sql,pgwire: fix a host of pgwire/sql interaction bugs
Prior to this patch, CockroachDB: - incorrectly ignored the `extra_float_digits` client parameter. - improperly reported `ISO` as default value for server status parameter and session var `DateStyle` (the pg default is `ISO, MDY`. - failed to report `TimeZone`, `is_superuser` and `session_authorization` in the server status parameters. - failed to report the correct (and client-provided) value of `application_name` in the server status parameters. - did not report the correct defaults in `pg_catalog.pg_settings`. This patch corrects these various bugs by: - keeping the client-provided parameters as session defaults, to be picked up by RESET and pg_settings. (Prior to this patch, the client parameters were discarded after setting up the session initially.) - extending the handling of session variables to support reporting their current value during connection intiialization. This way the server status parameter can report the session variables that were just initialized from the client-provided defaults. - eliminating the ad-hoc constant list of "statusServerParams" maintained in pgwire/conn.go, which could dangerously go out of sync with the session variable defaults without anyone noticing. - adding the missing reports for `is_superuser` and `session_authorization`. Because CockroachDB now properly honors the value of extra_float_digits provided by the client, any test that uses lib/pq must now account for the fact that lib/pq automatically sets this parameter to 2. The logic_test code is modified accordingly. Because CockroachDB now properly reports the current TimeZone parameter to the client during connection initialization, any test that uses lib/pq must now account for the fact that lib/pq will load that zone name into any parsed timestamp value coming from the server. The tests that print out timestamps have been modified accordingly. As a side effect of this fix, it is now possible to set arbitrary session variables in the client connection URL. This has another benefit reported in the release notes below. Release note (bug fix): CockroachDB now properly recognizes the value of `extra_float_digits` provided by clients as a connection parameter. Release note (bug fix): CockroachDB now properly recognizes two-part values for the session variable and connection parameter `DateStyle`, for compatibility with PostgreSQL. Release note (bug fix): CockroachDB now reports all server status parameters supported by PostgreSQL when setting up a session. This is expected to improve compatibility with some drivers. Release note (bug fix): CockroachDB now properly uses the client-provided default values when using the RESET statement (or SET ... = DEFAULT). Release note (bug fix): CockroachDB now properly fills the columns `boot_val` and `reset_val` in `pg_catalog.pg_settings` for better compatibility with PostgreSQL. Release note (cli change): It is now possible to provide initial/default values for any customizable session variable in the client connection URL. Release note (sql change): CockroachDB now supports more customizations from PostgreSQL client drivers when initially setting up the client connection.
Loading status checks…
storage: only track forwarded proposals that were successfully appended
Fixes #30064. Before this change, it was possible for a proposal that was forwarded to a leader to be dropped instead of appended to its log. This was possible if the leader had a `leadTransferee` set. This change avoids this issue by verifying that the proposal was successfully added to the leaders log before tracking it. This will need to be backported to 2.1 and 2.0. Release note: None
Loading status checks…
Merge pull request #31022 from nvanbenschoten/backport2.1-30990
release-2.1: storage: only track forwarded proposals that were successfully appended
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
sqlbase: don't permit PK columns in STORING list
Previously, users could create indexes that included PRIMARY KEY columns in the STORING list. This was effectively a no-op and misleading to users, since PRIMARY KEY columns are always stored in indexes regardless of the STORING list. Separately, permitting this tickled a bug in the descriptor accounting system. Now, this behavior is prevented by returning an error to the user if they try to do such a thing, with a helpful message explaining why it's not allowed. Release note (sql change): don't allow specifying STORING columns in indexes that are already part of the index's corresponding PRIMARY INDEX.
Verified
This commit was signed with a verified signature.
GPG key ID: CB92F5D43A08059A
Learn about signing commits
Loading status checks…
Commits on Oct 07, 2018
opt: support single-use CTEs
This commit introduces Cockroach-style single-use CTEs to the optimizer. Such CTEs cannot be referenced more than once in a query. Release note: None
opt: remove some unimplementedfs
These two checks are now exhaustive, meaning anything missing from them going forward is an error. Release note: None
sql: bark at unused CTEs containing mutations
The SQL standard (and pg) specifies that CTEs containing mutations are executed no matter how / how many times they are used in the remainder of the query. Meanwhile the heuristic planner + execution machinery is currently unable to force the execution of CTEs containing mutations if they are not otherwise used in the rest of the query. However meanwhile they are also accepted silently -- i.e. CockroachDB silently fails to do what the semantics require. This patch changes the behavior to instead report an error "feature not supported". Release note (bug fix): CockroachDB now reports an unimplemented error when a common table expression containing INSERT/UPDATE/UPSERT/DELETE is not otherwise used in the remainder of the query.
sql: do not silently ignore CTEs inside parentheses
Prior to this patch, CockroachDB silently ignored WITH clauses within parentheses, so that the following SQL would return incorrect results: ``` CREATE TABLE t(x INT); (WITH t AS (SELECT 1) TABLE t); ``` (note: `WITH ...` *without* parentheses did work fine) This patch fixes this particular issue, and causes CockroachDB to issue an "unimplemented error" in other cases not supported yet, for example when there are multiple nested WITH clauses within parentheses. Release note (bug fix): CockroachDB does not silently ignore WITH clauses within parentheses any more.
sql: properly support CTEs inside views
Release note (sql change): CockroachDB now supports CTEs inside views.
Loading status checks…
Merge pull request #31021 from knz/backport2.1-30508-30813-30702
release-2.1: sql,pgwire: fix a host of pgwire/sql interaction bugs + perf fixes
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Commits on Oct 08, 2018
sql: disable closed timestamp push in TestSchemaChangeAfterCreateInTxn
The schema change in TestSchemaChangeAfterCreateInTxn can occasionally take more than 5 seconds and would get pushed by the read timestamp cache by the closed timestamp mechanism. This effectively disables the closed timestamp push for this test. fixes #30492 Release note: None
Loading status checks…
lint: reorganize package
The lint_test.go file was getting rather large. Split out the custom "checkers" into their own files. Release note: None
Verified
This commit was signed with a verified signature.
GPG key ID: F7386C5DEADABA7F
Learn about signing commits
server,lint: fix misuse of hash.Hash.Sum
The hash.Hash interface is poorly designed and easily misused. Several
locations in our codebase were assuming that the Sum function returns
the hash of its input, when in fact it returns the concatenation of its
input with the hash of the empty string. See the comments within for the
full detail.s
This commit:
1. Corrects the code in our web UI login to avoid leaking session
secrets into the audit log. Since web UI login has only been
released in betas, there are no backwards compatibility concerns
here. Existing web sessions will simply be invalidated when the
cluster is upgraded and users will need to re-login.
2. Files a TODO about correcting the code in our password authentication. It
is not a security risk there as the SHA-256 application was only
intended to provided a fixed-length input to bcrypt. Fixing this
code path is more difficult as it requires a migration for existing
clusters, since this bug has been present since pre-1.0.
3. Adds a linter to prevent future misuse.
Release note: NoneVerified
This commit was signed with a verified signature.
GPG key ID: F7386C5DEADABA7F
Learn about signing commits
Loading status checks…
storage: don't serve requests on RHS after a merge commits
Previously, it was possible for the leaseholder of the right-hand side of a merge to erroneously serve requests after the merge committed. This would occur when the RHS's watcher goroutine noticed that a merge committed before the LHS on that store applied the merge commit trigger. In this case, the watcher goroutine would unblock traffic, but that traffic would be served normally because the RHS would not be marked as destroyed. In effect, the watcher goroutine was assuming that the RHS would always be marked as destroyed before it discovered that the merge had committed, but there is no such guarantee. The fix is to teach the watcher goroutine to mark the replica as destroyed if the merge has committed before unblocking traffic. With the fix in place, TestStoreRangeMergeRHSLeaseExpiration is no longer flaky. For good measure, add a new test, TestStoreRangeMergeWatcher, which more reliably reproduces the consistency violation. Fix #30349. Release note: None
Verified
This commit was signed with a verified signature.
GPG key ID: F7386C5DEADABA7F
Learn about signing commits
Loading status checks…
ui: add bar chart for node list memory & capacity
Fixes: #29373 Release note (admin ui change): Adds a bar chart to the memory and capacity usage columns on the node list.
ui: sort memory & capacity columns by percent
Release note (admin ui change): Sorting by the memory or capacity usage column on the node list now sorts by percentage used.
ui: fix node list bar height in Chrome
Chrome and Firefox have different rules about CSS selectivity for SVG elements, apparently. This is a hack, we should find a simpler way to handle this (maybe changing the conflicting classes). Release note: None
Loading status checks…
Merge pull request #31056 from vivekmenezes/backport2.1-30997
backport-2.1: sql: disable closed timestamp push in TestSchemaChangeAfterCreateInTxn
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
knz
and jordanlewis
sql: properly rename stored columns
Prior to this patch ALTER TABLE RENAME COLUMN did not properly rename stored column in indexes. This patch fixes it. Release note (bug fix): CockroachDB now properly supports renamining a column that's also stored in an index.
Verified
This commit was signed with a verified signature.
GPG key ID: CB92F5D43A08059A
Learn about signing commits
Loading status checks…
Merge pull request #31032 from jordanlewis/backport2.1-31019
backport-2.1: sqlbase: don't permit PK columns in STORING list
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31074 from jordanlewis/backport2.1-31010
release-2.1: sql: properly rename stored columns
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #30218 from knz/backport2.1-30210
release-2.1: cli: hint the syntax of client commands in `start` output
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
server: Fix EnqueueRange to respect its NodeID parameter
This got broken by some sloppy refactoring to make the method use iterateNodes rather than a more one-off approach to forwarding the request to nodes using the isLiveMap. Release note (bug fix): Fix the _admin/v1/enqueue_range debug endpoint to always respect its node_id parameter.
Loading status checks…
Merge pull request #31058 from benesch/backport2.1-30986
release-2.1: storage: don't serve requests on RHS after a merge commits
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
gossip: use "n%d" instead of "node %d" in log messages
This normalizes node IDs in gossip log messages with the rest of the code base. Release note: None
gossip: avoid sending unnecessary client to server infos
Delay registration of the callback for triggering client to server info propagation until we've received the first response from the server which will contain the server's high water stamps. Add a test (currently skipped) which demonstrates the problem the most-distant calculation. See #30895 Release note: None
gossip: propagate most-distant marker infos on every connection
Whenever a gossip connection is created, propagate the most-distant marker infos (i.e. `node:<id>` infos) to the remote node. These infos are used for the `mostDistant` calculation and need to accurately reflect the number of hops to a node. Note that this is a bandaid. Using the info hops value to calculate the distance to a node does not work correctly unless infos are always propagated. The high water stamps mechanism that avoids sending an info that the remote already has can allow the info hops value to remain higher or lower than the actual value. Consider the following gossip network: 1 -> 2 1 -> 3 2 -> 3 3 -> 4 When n1 gossips its `node:1` info it has multiple paths to get to n4. We can either see `1 -> 2 -> 3 -> 4` or `1 -> 3 -> 4`. Depending on the path the hops value will differ and the path is timing dependent. Even worse, consider what happens when the network changes. For example, start with the network `1 -> 2 -> 3 -> 4`. The network then changes to: 1 -> 3 2 -> 3 3 -> 4 The `node:<id>` keys have a TTL of 2h. In the initial configuration, n2 is considered to be 1 hop distant from n1. But after the reconfiguration, n2 is in reality 2 hops distant from n1, yet the `node:2` key living on n1 will not have been updated because it hasn't changed and the new hops value is higher. The new `gossip-clients:*` keys give us a way out of this complexity as each node can compute the shortest path to every other node, but those keys are not generated by v2.0.x of CockroachDB so we'll have to wait to use them for that purpose. Fixes #30895 Release note: None
Loading status checks…
sql: remove protobuf output from `show zone configurations`
This shouldn't be in the output for the 2.1 release, the tests that use this to verify zone configs now can use the `crdb_internal.zones` table. Release note (sql change): output of `SHOW ZONE CONFIGURATIONS` and `SHOW ZONE CONFIGURATION FOR` now only shows the zone name and the SQL representation of the config.
Loading status checks…
distsql: eagerly evaluate constant expressions
exprHelper now evaluates constant subexpressions upon initialization, rather than re-evaluating them every time `eval` or `evalFilter` is called, and thus avoids a hefty per-row cost for expensive expressions. For example, the SELECT query in the example below now returns in ~30ms rather than ~10s. ``` CREATE TABLE t (x int[]); INSERT INTO t SELECT array[x] FROM generate_series(1, 10000) AS x; SELECT * FROM t WHERE x = (SELECT array_agg(generate_series(1,10000))); ``` Fixes #30167 Release note: None
Loading status checks…
Merge pull request #31070 from couchand/backport2.1-30982
release-2.1: ui: add bar chart for node list memory & capacity
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
ui: Add debug page for the EnqueueRange admin endpoint
It's probably the worst-constructed page this UI has ever seen, but I managed to get something working. Feedback appreciated, but keep in mind that we'd like to squeeze something in for 2.1 (unless there are security-related reasons to keep it out, in which case the endpoint itself would be a concern moreseo than this page), since without this sort of page using the endpoint is pretty tough. The only issue I still have is that 400 errors don't display any detail about the error, just "Bad Request", and I'm not sure how to fix that. It's far from a show stopper, though. Release note (admin ui change): Added a debug page with a form that lets you manually enqueue a range in one of the various store-level replica queues on the store of your choice. For advanced users only.
Merge pull request #31088 from petermattis/backport2.1-31025-31042
release-2.1: gossip: propagate most-distant markers on every connection
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31089 from ridwanmsharif/backport2.1-30985
release-2.1: sql: remove protobuf output from `show zone configurations`
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31057 from benesch/backport2.1-30859
release-2.1: server,lint: fix misuse of hash.Hash.Sum
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #30935 from mjibson/backport2.1-30932
release-2.1: security: use same error message for user DNE and bad password
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31092 from a-robinson/backport2.1-31035
release-2.1: ui: Add debug page for the EnqueueRange admin endpoint
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
sql: fix planning of wrapped local nodes
Previously, wrapped local nodes that contained omitted columns could crash the database in various ways. DistSQL physical planning wasn't taking into account the omitted state of columns for wrapped nodes. This commit fixes the issue. Release note: None
Verified
This commit was signed with a verified signature.
GPG key ID: CB92F5D43A08059A
Learn about signing commits
Loading status checks…
Merge pull request #31091 from solongordon/backport2.1-30216
release-2.1: distsql: eagerly evaluate constant expressions
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31087 from a-robinson/backport2.1-31036
release-2.1: server: Fix EnqueueRange to respect its NodeID parameter
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31008 from danhhz/backport2.1-30974
release-2.1: changefeedccl: support a minimum frequency between resolved ts emits
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
sql: include distsql queries in `sql.{service,exec}.latency` metrics
Previously, the `sql.{service,exec}.latency` histogram metrics only
included local queries; distributed queries' latencies were recorded in
the `sql.distsql.{service,exec}.latency` metrics.
However, the UI had assumed that the `sql.service.latency` included all
SQL statements both local and distributed, and therefore had a graph of
it on the Overview dashboard, as well as having its most recent value
in the sidebar of the time series area.
With this change, the latencies of all statements are recorded in
`sql.{service,exec}.latency`, changing those metrics to mean what we had
assumed they meant. DistSQL queries will no longer be left out of this
prominent graph and sidebar metric.
Release note (admin ui change): The "service latency: {90,99}th
percentile" graphs on the Overview and SQL dashboard, as well as the P50
and P99 latency numbers in the time series area sidebar, now reflect
latencies of both local and distributed queries. Previously, they only
included local queries.
ui: remove DistSQL latency graphs from SQL dashboard
These are not very useful now that the execution engines have been merged. Release note: none
Loading status checks…
Commits on Oct 09, 2018
Merge pull request #31097 from jordanlewis/backport2.1-30942
release-2.1: sql: fix planning of wrapped local nodes
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
ui: open docs links in new tab
Closes: #24780 Release note (admin ui change): Links to documentation pages now open in a new tab.
Loading status checks…
Loading status checks…
Merge pull request #31136 from couchand/backport2.1-31099
release-2.1: sql: only quantize counts when scrubbing stmt stats
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
changefeedccl: support TIMESTAMP and DECIMAL with the avro format
Timestamp is relatively straightforward and uses the corresponding logical type. The avro spec also has a logical type for decimals, but ours cover a number of cases that it doesn't (NaN, Inf, per-datum precision and scale). I think the right answer for them is to make this a union with a `crdb.decimal` logical type that has a string representation. Unfortunately, we can't do that without some surgery to the avro library we use and it seems too late in the game to do that. For now, leave them unsupported. A number of column types are still unsupported with avro, but this is probably a good enough core that we can mention the experimental support. Release note (enterprise change): CHANGEFEEDs now have limited and experimental support for the avro format.
Loading status checks…
Merge pull request #31138 from changangela/sql-change-ranges-columnna…
…mes-release-2.1 release-2.1: rename crdb_internal.ranges column names
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
changefeedccl: fix TestAvroSchema/DECIMAL flake
The precision is really meant to be in [1,10], but it sure looks like there's an off by one error in the avro library that makes this test flake if it picks precision of 1. Release note: None
Loading status checks…
Merge pull request #31116 from vilterp/backport2.1-31098
release-2.1: sql, ui: include distsql queries in `sql.{service,exec}.latency` metricsVerified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31143 from danhhz/backport2.1-31104
release-2.1: changefeedccl: support TIMESTAMP and DECIMAL with the avro format
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
cdc: Test for feed falling behind table GC
Constructs a test which verifies that Changefeeds exit with an error if they fall behind the GC TTL of the table data being read. In order to test this correctly, a new "ManuallyEnqueueSpan()" function has been added to the Store object, intended for internal tests with access to the Store to manually force any replicas in the provided span through a specific replica queue. Release note: None
cdc: Test for falling behind schema TTL
Add a test that ensures that changefeeds properly exit if they fall far enough behind that schema information has been lost due to the GC TTL (that is, a historical row version can no longer be read because the schema at its timestamp has been garbage collected). I have also discovered why the sister test (for the table TTL, not the schema) required a 3 second sleep: the GC queue enforces that replicas must have an appropriately high "score" before being GCed, even when the "shouldQueue" process is skipped. I have swapped to using the "ManuallyEnqueue" method to force the GC, and instead use the already existing GCRequest request type to force a GC of the table; as a result the tests no longer require any sleep. Resolves #28644 Release note: None
cdc: Fix Sink Error Retries + Chaos Test
Fixes a few related bugs that were causing the CDC kafka chaos test to fail- The `retryableSinkError` returned from kafkaSink was not being returned as a pointer, meaning it was not being detected correctly. Additionally, retryable connection errors could be thrown while attempting to connect the sink initially, but these were not being marked as retryable. If the kafka error occurs on a remote node in the DistSQL operation, it is marshalled over the wire as a `pgerror.Error`, meaning it can no longer be detected with type assertions. We now check for this in `isRetryableError`. Finally, the CDC chaos test itself was not properly silencing possible errors from `confluent destroy`. Fixes #29243 Release note: None
Loading status checks…
Loading status checks…
Merge pull request #31161 from mrtracy/backport2.1-30335-31020-31037
backport-2.1: cdc: GC TTL tests + Fix Sink Error Retries
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
cdc: Support Schema Changes with Backfill
Changefeeds can now correctly continue when watched tables are altered in ways that require a backfill operation. To represent a backfill through the changefeed, a full scan of the watched tables is performed at the timestamp when the table descriptor for the finalized schema change is detected (when the modified columns become public). Note that, due to the backfill process writing rows in the background, the changefeed will see numerous "no-op" writes, where each backfilled row is written with no apparent changes. However, this does not violate any correctness guarantees, it is just inefficient. Additionally, note that this commit changes the behavior of initial scans; previously, an initial scan would return the latest value for each key at the timestamp of the key. However, in order to capture schema changes that occurred in between the CHANGEFEED creation and the last write of each key, we now treat the initial scan as a backfill and output each key at the statement time. We have temporarily modified one test to allow this to be committed, re-enabling it is tracked by #31110. Release note: Changefeeds now continue running when watched tables are ALTERed in ways that require a backfill.
Loading status checks…
Commits on Oct 10, 2018
Merge pull request #31165 from mrtracy/backport2.1-30902
backport-2.1: cdc: Support Schema Changes with Backfill
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
storage: reduce commit index on quiescence heartbeat, don't drop them
Informs #30064. 53dc851 introduced logic to drop quiescence heartbeats to Replicas that are not caught up to the leader. This turns out to be an issue in cases where: - a Range is quiescent - a Replica needs a heartbeat to join a Raft group - that Replica's node is unable to update its liveness record because doing so depends on the Replica joining the Raft group - so the Replica never gets any heartbeats and never joins the group This change adjusts the logic. Instead of dropping these heartbeats, the leader Replica now sends them, but with a reduced commit index and with Quiesce equal to false. Release note: None
Loading status checks…
sql: always include filters in EXPLAIN
Previously, EXPLAIN only included filters and join conditions when given the VERBOSE option. This proved to be confusing for debugging, as the heuristic of checking a scan for spans doesn't necessarily mean that scan has enough indexes to be efficient. Unconditionally showing the filter condition will make this a lot more obvious. Release note (sql change): EXPLAIN now always shows filter and join conditions.
Verified
This commit was signed with a verified signature.
GPG key ID: CB92F5D43A08059A
Learn about signing commits
Loading status checks…
Merge pull request #31186 from jordanlewis/backport2.1-31168
release-2.1: sql: always include filters in EXPLAIN
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31162 from couchand/backport2.1-31157
release-2.1: ui: add license header to all oss code
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
distsql: don't use sortTopK when filter is present
The sorter was producing incorrect results when both a limit and a filter were applied. We can't use sortTopK in this case since some results may be filtered out in post-processing. Note this scenario is somewhat rare because typically the filter would be pushed down below the sort. The issue was observed when selecting from the result of a SHOW TRACE. Also removed a bit of dead code. Fixes #31163 Release note: None
Loading status checks…
sql: fix index backfill read before GC TTL threshold error
Before this change the historical read timestamp would remain fixed for the duration of the index backfill. But if the index backfill takes a long time or keeps restarting the timestamp can exceed the GC window (configurable and defaults to 24hrs). Sometimes customers are told to set the GC window to as low as 10m to reclaim disk space. It was never clear what was the value of keeping this indefinitely fixed. In fact it's quite likely it's worse to keep it fixed, because any UPDATE to a row is likely to trigger redoing the index backfill for the subspan containing the row at the current time. This change marks the GC TTL threshold error as a non-permanent error. On hitting the error, the backfill will be restarted at the last checkpoint after picking a new historical read timestamp. fixes #29192 Release note (sql change): fix schema change rollback caused by GC TTL threshold error.
Loading status checks…
server: fix crash of data distribution endpoint after dropping a table
The crash was caused by trying to get the zone config with `SHOW ZONE CONFIGURATION FOR TABLE` for a table that had been dropped, producing an unexpected error. Release note: None
ui: data distribution: grey out dropped tables
Also add a blurb under the zone config list explaining what greying out means. Release note: None
ui: data distribution: tweak zone config styling
Just show the SQL, not the cli specifier, since we don't use CLI specifiers anymore. Release note: None
ui: refactor: provide default className for Loading component
Most usages pass `loading-image loading-image__spinner-left` to the className prop; make that the default and remove the prop for those usages. Release note: None
ui: refactor: make spinner default image to Loading component
...and remove all that prop from all the usages that passed it. Release note: None
Loading status checks…
Merge pull request #31132 from couchand/backport2.1-31105
release-2.1: ui: open docs links in new tab
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31207 from vilterp/backport2.1-31117
release-2.1: server, ui: fix data distribution endpoint
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Commits on Oct 11, 2018
Merge pull request #31153 from vivekmenezes/backport2.1-30648
backport-2.1: sql: fix index backfill read before GC TTL threshold error
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31231 from vilterp/backport2.1-31137
release-2.1: ui: add empty state to databases page
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
ui: avoid using font which isn't loaded yet in alert banner
The "we're having trouble connecting to the cluster" banner, while already annoying, also often looks janky because it's in Times New Roman. This happens because it's styled to use Lato-Bold, which isn't used much in the UI and as such usually hasn't been loaded at the point that the banner appears. It can't be loaded when the banner appears because the UI can't connect to the cluster. This change uses Lato-Regular with `font-face: bold` applied, which looks almost the same but is always loaded so we don't see the banner in Times New Roman. Release note: None
Loading status checks…
ui: allow SortedTable and SortableTable to expand and collapse rows
if optional "expandable config" is provided. Release note: None
ui: jobs page: use expandable table
Release note (admin ui change): Update jobs table to make each row expandable, allowing the user to see the error message for failed jobs.
ui: jobs page: remove background colors based on job state
With the icons, these add more visual distraction than they're worth. Release note: None
ui: jobs page: add icons to indicate job state
Green checkmark for completed, red exclamation point for failed. Release note: None
ui: lint: fix indentation in jobs page
To use
```
return (
<div>
...
</div>
);
```
Instead of
```
return <div>
...
</div>;
```
Release note: NoneLoading status checks…
Merge pull request #31236 from vilterp/backport2.1-31228
release-2.1: ui: avoid using font which isn't loaded yet in alert banner
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31237 from vilterp/backport2.1-29450
release-2.1: ui: make rows in jobs table expandable to see details
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
Loading status checks…
Merge pull request #31248 from tschottdorf/backport2.1-31215
backport-2.1: storage: deflake TestStoreRangeMergeWatcher
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
ui: scope table padding under debug index panel section class
...so it doesn't apply to the jobs page and other pages. Release note: None
Loading status checks…
Merge pull request #31174 from nvanbenschoten/backport2.1-31112
release-2.1: storage: reduce commit index on quiescence heartbeat, don't drop them
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31262 from vilterp/backport2.1-31244
release-2.1: ui: scope table padding under debug index panel section class
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31253 from tschottdorf/backport2.1-31063
backport-2.1: github-pull-request-make: fail on hanging tests
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
storage: avoid spurious nodeDialer logs
breaker.Success() retrieves its count from an underlying windowed counter that resets every 10 seconds. As a result, spurious "established connection to nX" messages would pop up every 10s. It turns out it's annoyingly difficult to properly gauge whether an established connection is the first of its kind. In trying to do so, I became unconvinced that this is even worth it, so I ended up removing it. I similarly simplified the logging in the unsuccessful case (though ConsecutiveFailures is actually not a windowed counter and presumably worked correctly). I also downgraded the message in the error case to Infof, as it's expected to see it when nodes are restarted (which is a routine operation and nothing to worry about). We want to keep the Warning level for true warnings. Release note: None
nodedialer: Reset() breaker only when it is tripped
This is slightly better since it only resets the breaker state (and with it the underlying counters) when it's tripped. This shouldn't result in any external changes but made the problem fixed in #31017 much more visible than it would've otherwise been. Release note: None
Loading status checks…
Merge pull request #31249 from tschottdorf/backport2.1-30816
backport-2.1: storage: deflake TestStoreSplitRangeLookupRace
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
opt: normalize ANY = ... to IN ...
This commit adds two rules which, in concert, allow a filter of the form
x = ANY ARRAY[...]
to constrain a scan on an index of x.
It's unclear to me if this is a win in the general case, but addressing
the conversation from a couple days ago where we discussed enabling a
placeholder ARRAY to be used instead of a tuple to possible make better
use of the plan cache.
Release note: NoneLoading status checks…
sql: capture internal/assertion errors
Prior to this patch, assertion/internal errors were "merely" reported
to the client with pg error code CodeInternalError and nothing would
happen further. This was causing 2 problems:
- it was unclear for the user what to do with this information.
- the occurrences were not further collected and could not be used to
track bugs automatically.
This patch improves the situation as follows:
- a new constructor `pgerror.NewAssertionErrorf` is introduced, which:
- gives a hint to the user about submitting the error as a bug with
details.
- populates the InternalCommand with a shortened stack trace.
- the new constructor is used instead of
`pgerror.NewErrorf(pgerror.CodeInternalError` throughout the SQL
layer.
- the reporting mechanism now detects CodeInternalError errors,
collects then reports them with other node statistics.
Before:
```
root@127.0.0.1:56399/defaultdb> select crdb_internal.force_assertion_error('woo');
pq: crdb_internal.force_assertion_error(): programming error: woo
```
After:
```
root@127.0.0.1:63733/defaultdb> select crdb_internal.force_Assertion_error('woo');
pq: crdb_internal.force_assertion_error(): programming error: woo
DETAIL: builtins.go:2805,eval.go:3547,expr.go:194,processors.go:378,processors.go:745,values.go:125,base.go:170,processors.go:768,flow.go:596,distsql_running.go:261,distsql_running.go:768,conn_executor_exec.go:983,conn_executor_exec.go:825,conn_executor_exec.go:403,conn_executor_exec.go:95,conn_executor.go:1189,conn_executor.go:466,conn.go:309
HINT: You have encountered an error inside CockroachDB. Don't worry! Your data is likely safe.
Please report this error with details at:
https://github.com/cockroachdb/cockroach/issues/new/choose
or
support@cockroachlabs.com
Thank you!
```
Release note (sql change): CockroachDB will now hint that internal
errors should be reported as bugs by users. Additionally, internal
errors are now collected internally and submitted (anonymized) with
other node statistics when statistic collection is enabled.Loading status checks…
Loading status checks…
sql: make DISTSQL option to EXPLAIN ANALYZE optional
Reduce user surprise by not requiring a DISTSQL option in EXPLAIN ANALYZE. Release note (sql change): EXPLAIN ANALYZE <statement> is now a valid equivalent of EXPLAIN ANALYZE (DISTSQL) <statement>
Loading status checks…
Merge pull request #31051 from knz/backport2.1-30858-30939-31003-3100…
…4-31007 release-2.1: assorted CTE fixes
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31272 from knz/backport2.1-31261
release-2.1: sql: capture and report internal/assertion errors
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
sql: fix the schema type check for INSERT/UPSERT
The types of the input data for a mutation (the data source clause for INSERT/UPSERT, the result of SET RHS for UPDATE) must match the types of the columns being mutated. Prior to this patch, this check was properly done early by UPDATE, however it was not done at the right time for INSERT/UPSERT. The code for INSERT/UPSERT was relying on an assertion check very deep down in the encoding of datums to KV values. This assertion check was never meant to be an input validation check, but because Go does not really give us semantic assertions nobody noticed the check was abused. This patch clarifies the situation by introducing `pgerror.NewAssertionErrorf` and using it there as appropriate. Later patches can introduce more uses of pgerror.NewAssertionErrorf where appropriate (e.g. everywhere we already use CodeInternalError). In addition, the proper check for INSERT/UPSERT is introduced at the right place, early during semantic analysis. Release note (bug fix): CockroachDB will no longer fail in unexpected ways or write invalid data when the type of input values provided to INSERT/UPSERT does not match the type of the target columns.
sql: ensure UPDATE checks column constraints before CHECK constraints
This is required for postgres compatibility: the CHECK expressions must be able to assume that the column data is already valid according to the column type and nullability constraint. The code for INSERT/UPSERT was already valid, only UPDATE needed to be fixed. However this patch provides the corresponding test for all 3 mutations. Release note (bug fix): UPDATE now verifies the column constraints before CHECK constraints, for compatibility with PostgreSQL.
sql: add missing mutation check tests
The mutations must validate column constraints before they perform FK checks. There were no clear tests for this. This patch adds the missing tests. Release note: None
sql: prevent UPDATE RETURNING from seeing non-public columns
Prior to this patch, it was possible to use a newly added but not yet visible column in UPDATE RETURNING. This patch fixes it. INSERT/UPSERT/DELETE were not affected, however this patch adds the corresponding tests for all 4 mutation statements -- this aspect was not tested before. Release note (bug fix): It is not possible any more to use not-fully-added-yet columns in the RETURNING clause of UPDATE statements.
sql: prevent INSERT DO UPDATE from silently setting computed columns
Release note (bug fix): CockroachDB does no longer incorrectly and silently accept a computed column on the left side of the assignment in a ON CONFLICT DO UPDATE SET clause.
sql: prevent INSERT DO UPDATE SET from assigning mutation columns
This is a band aid, a refactoring of the upsert pipeline is required for a more robust solution. Release note (bug fix): CockroachDB does no longer incorrectly and silently accept a not-fully-added-yet column on the left side of the assignment in a ON CONFLICT DO UPDATE SET clause.
Loading status checks…
Merge pull request #31252 from tschottdorf/backport2.1-31017
backport-2.1: storage: avoid spurious nodeDialer logs
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31271 from justinj/backport2.1-30973
backport-2.1: opt: normalize ANY = ... to IN ...
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
storage: de-flake TestStoreRangeWaitForApplication
Errant requests could sneak in and confuse the lease counter. Lock down the proposals for r2 while we're relying on a predictable LeaseAppliedIndex. Fixes #30866. Release note: None
Loading status checks…
Merge pull request #31190 from solongordon/backport2.1-31189
release-2.1: distsql: don't use sortTopK when filter is present
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
sql: add merge joiner benchmark and memory account shrinking optimiza…
…tion Merge joiner benchmark comparison against `release-2.1` ``` name old time/op new time/op delta MergeJoiner/InputSize=0-8 4.31µs ±10% 4.33µs ±15% ~ (p=0.968 n=10+9) MergeJoiner/InputSize=4-8 8.34µs ± 3% 8.10µs ± 4% ~ (p=0.074 n=8+9) MergeJoiner/InputSize=16-8 16.3µs ± 2% 11.1µs ± 5% -31.87% (p=0.000 n=9+9) MergeJoiner/InputSize=256-8 190µs ± 2% 85µs ± 2% -55.04% (p=0.000 n=10+8) MergeJoiner/InputSize=4096-8 2.96ms ± 2% 1.28ms ± 2% -56.86% (p=0.000 n=10+10) MergeJoiner/InputSize=65536-8 49.0ms ± 5% 20.6ms ± 1% -57.88% (p=0.000 n=10+10) name old alloc/op new alloc/op delta MergeJoiner/InputSize=0-8 6.42kB ± 0% 6.65kB ± 0% +3.49% (p=0.000 n=10+10) MergeJoiner/InputSize=4-8 9.50kB ± 0% 9.72kB ± 0% +2.36% (p=0.000 n=10+10) MergeJoiner/InputSize=16-8 9.50kB ± 0% 9.72kB ± 0% +2.36% (p=0.000 n=10+10) MergeJoiner/InputSize=256-8 32.5kB ± 0% 32.8kB ± 0% +0.69% (p=0.000 n=10+10) MergeJoiner/InputSize=4096-8 401kB ± 0% 401kB ± 0% +0.06% (p=0.000 n=9+10) MergeJoiner/InputSize=65536-8 6.30MB ± 0% 6.30MB ± 0% +0.00% (p=0.000 n=9+10) name old allocs/op new allocs/op delta MergeJoiner/InputSize=0-8 14.0 ± 0% 15.0 ± 0% +7.14% (p=0.000 n=10+10) MergeJoiner/InputSize=4-8 16.0 ± 0% 17.0 ± 0% +6.25% (p=0.000 n=10+10) MergeJoiner/InputSize=16-8 16.0 ± 0% 17.0 ± 0% +6.25% (p=0.000 n=10+10) MergeJoiner/InputSize=256-8 46.0 ± 0% 47.0 ± 0% +2.17% (p=0.000 n=10+10) MergeJoiner/InputSize=4096-8 526 ± 0% 527 ± 0% +0.19% (p=0.000 n=10+10) MergeJoiner/InputSize=65536-8 8.21k ± 0% 8.21k ± 0% +0.01% (p=0.000 n=10+10) name old speed new speed delta MergeJoiner/InputSize=4-8 7.67MB/s ± 3% 7.91MB/s ± 4% ~ (p=0.070 n=8+9) MergeJoiner/InputSize=16-8 15.7MB/s ± 2% 23.0MB/s ± 5% +46.89% (p=0.000 n=9+9) MergeJoiner/InputSize=256-8 21.6MB/s ± 2% 48.0MB/s ± 2% +122.41% (p=0.000 n=10+8) MergeJoiner/InputSize=4096-8 22.1MB/s ± 2% 51.3MB/s ± 2% +131.81% (p=0.000 n=10+10) MergeJoiner/InputSize=65536-8 21.4MB/s ± 5% 50.8MB/s ± 1% +137.16% (p=0.000 n=10+10) ``` Release note: None
Loading status checks…
sql: attempt to deflake distsql physical planner tests
Make sure the range cache is populated before verifying things about it. Release note: None
Loading status checks…
Merge pull request #31276 from a-robinson/backport2.1-31270
release-2.1: sqlmigrations: Downgrade log message from error to info
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31285 from tschottdorf/backport2.1-31239
backport-2.1: sql: attempt to deflake distsql physical planner tests
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Commits on Oct 12, 2018
sql: enable client to override index selection for DELETE and UPDATE
Prior to this patch, if the automatic index selection for DELETE or UPDATE was inadequate, there was no way to override it like it is possible for SELECT/INSERT/UPSERT. This patch fixes this by extending and supporting the syntax for DELETE and UPDATE: ``` DELETE FROM tbl@idx ... UPDATE tbl@idx SET ... ``` Release note (sql change): it is now possible to force a specific index for DELETE or UPDATE.
Loading status checks…
cli: minimize --certs-dir flag description.
Certificate setup has expanded to the point where details cannot be explained sufficiently here. Users should refer to documentation instead. Release note: none
Loading status checks…
Merge pull request #31279 from knz/backport2.1-31012
release-2.1: sql: enable client to override index selection for DELETE and UPDATE
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
sql: better memory accounting in windower
Previously, the size of the bucket key wasn't taken into account. Also, now nil out the partition map when closing the windower to ensure memory is freed in a timely manner. Release note: None
Verified
This commit was signed with a verified signature.
GPG key ID: CB92F5D43A08059A
Learn about signing commits
sql: fix flaky TestShowQueries
There was a potential data race, and an incorrect check for a common query (it's SHOW CLUSTER SETTING version, not capital VERSION). Release note: None
Verified
This commit was signed with a verified signature.
GPG key ID: CB92F5D43A08059A
Learn about signing commits
Loading status checks…
Merge pull request #31302 from jordanlewis/backport2.1-30776-31241
backport-2.1: sql: better memory accounting in windower; fix flaky TestShowQueries
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Loading status checks…
importccl: ignore mysql's _binary introducer
MySQL version 5.7.23 included a change to mysqldump, compared to .22, to prefix binary fields with the '_binary' introducer. These are described in the mysql docs here: https://dev.mysql.com/doc/refman/5.7/en/charset-introducer.html Fixes #31169. Release note (sql change): handle binary fields dumped by muysqldump v5.7.23 with _binary prefix.
Verified
This commit was signed with a verified signature.
GPG key ID: 01D8438FDFAE4E9A
Learn about signing commits
importccl: add explicit default to mysql testdata timestamp
this makes the testdata work on mysql 8.0.2+, where the timestamp type no longer has the implicit defaults. Release note: none.
Verified
This commit was signed with a verified signature.
GPG key ID: 01D8438FDFAE4E9A
Learn about signing commits
importccl: parse zero mysql dates as null
these nonsense values are permitted by older / less strict mysql versions but have no cockroach counterpart -- a date is either null, or an actual date, which cannot have a zero day or month. Mapping these values to null is the closest we can get them, and in schemas that allow null values, hopefully makes migration easier. In schemas that do not allow nulls these will of course produce errors but we do not really have another option in those cases. Fixes #29298. Release note: none.
Verified
This commit was signed with a verified signature.
GPG key ID: 01D8438FDFAE4E9A
Learn about signing commits
Loading status checks…
craig[bot]
and
bdarnell
Merge #31304
31304: backport-2.1: cluster: Create final cluster version for 2.1 r=a-robinson a=bdarnell Release note: None Co-authored-by: Ben Darnell <ben@bendarnell.com>
Loading status checks…
deps: bump go-libedit
Release note (build change): CockroachDB can now be built from source on macOS 10.14 (Mojave).
Loading status checks…
Merge pull request #31299 from knz/backport2.1-31082
release-2.1: Update the `unique_rowid` description
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31305 from dt/backport2.1-31188-31217-31288
release-2.1: mysql import polish fixes
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
ccl/storageccl/engineccl: properly handle intents which straddle ssta…
…bles An intent which straddles an sstable can lead an incremental iterator to incorrectly ignore an sstable. In order to fix this, when an intent straddles an sstable (i.e. the metadata key is the last key in the sstable) we need to include the intent's timestamp in the timestamp bounds. We don't need to do this for interior intents because we'll already be including the intent's timestamp as it is contained in the next key following the intent. Add `TestMVCCIncrementalIteratorIntentStraddlesSStables` which demonstrates the problem. Fixes #28358 Release note (bug fix): Fix a rare scenario where a backup could incorrectly include a key for a transaction which was aborted.
Loading status checks…
Merge pull request #31316 from petermattis/backport2.1-31290
release-2.1: ccl/storageccl/engineccl: properly handle intents which straddle sstables
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31283 from changangela/20181011-backport-31216
release-2.1: sql: add merge joiner benchmark and memory account shrinking optimiza…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31251 from tschottdorf/backport2.1-30919
backport-2.1: storage: de-flake TestStoreRangeWaitForApplication
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
roachtest: print output on failure in election test
This was hiding the output if the invocation itself failed, which is when you wanted it most. Release note: None
kv: try next replica on RangeNotFoundError
Previously, if a Batch RPC came back with a RangeNotFoundError, we would immediately stop trying to send to more replicas, evict the range descriptor, and start a new attempt after a back-off. This new attempt could end up using the same replica, so if the RangeNotFoundError persisted for some amount of time, so would the unsuccessful retries for requests to it as DistSender doesn't aggressively shuffle the replicas. It turns out that there are such situations, and the election-after-restart roachtest spuriously hit one of them: 1. new replica receives a preemptive snapshot and the ConfChange 2. cluster restarts 3. now the new replica is in this state until the range wakes up, which may not happen for some time. 4. the first request to the range runs into the above problem @nvanbenschoten: I think there is an issue to be filed about the tendency of DistSender to get stuck in unfortunate configurations. Fixes #30613. Release note (bug fix): Avoid repeatedly trying a replica that was found to be in the process of being added.
kv: cache leaseholder on successful response
Whenever a successful response is received from an RPC that we know has to contact the leaseholder to succeed, update the leaseholder cache. The immediate motivation for this is to be able to land the preceding commits, which greatly exacerbated (as in, added a much faster failure mode to) ``` make stress PKG=./pkg/sql/logictest TESTS=TestPlannerLogic/5node-dist/distsql_interleaved_join ``` However, the change is one we've wanted to make for a while; our caching and in particular the eviction of leaseholders has been deficient essentially ever since it was first introduced. Touches #31068. Release note: None
Loading status checks…
Merge pull request #31250 from tschottdorf/backport2.1-31013
backport-2.1: kv: try next replica on RangeNotFoundError
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Commits on Oct 13, 2018
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Commits on Oct 14, 2018
Merge pull request #31278 from asubiotto/backport2.1-31277
release-2.1: sql: make DISTSQL option to EXPLAIN ANALYZE optional
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Commits on Oct 15, 2018
sql: make heuristic planner bail on HAVING without FROM
The heuristic planner is unable to plan HAVING without FROM properly. Instead of silently and incorrectly accepting this construct, this patch makes it error out. Release note (bug fix): CockroachDB does not any more silently and incorrectly ignore the HAVING clause on SELECT without FROM.
Loading status checks…
sql: bump SET CLUSTER SETTING gossip timeout
This change bumps the timeout that SET CLUSTER SETTING statements wait for gossip to reflect their expected value. I had seen this timeout fail when running in highly-distributed clusters under load. 10 seconds seems more reasonable. Release note: None
Loading status checks…
Merge pull request #31300 from knz/backport2.1-29653
release-2.1: cli: minimize --certs-dir flag description.
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
storage: eagerly queue undersize ranges for merging
When processing a write, check if the range has dropped beneath the minimum size threshold. If it has, check whether the merge queue would like to process it. This is analogous to our logic for eagerly splitting oversize ranges. Fix #29004. Release note: None
Verified
This commit was signed with a verified signature.
GPG key ID: F7386C5DEADABA7F
Learn about signing commits
Loading status checks…
Merge pull request #31347 from knz/backport2.1-31346
release-2.1: sql: make heuristic planner bail on HAVING without FROM
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
sql/parser: annotate unimplemented features with suitable errors
This patch recognizes more syntax from PostgreSQL for the purpose of
reporting more fine grained "unimplemented feature" errors.
- new:
- CREATE/DROP
AGGREGATE / CAST / COLLATION / CONVERSION / DOMAIN / EXTENSION /
FOREIGN TABLE / FOREIGN DATA (WRAPPER) / FUNCTION / LANGUAGE /
OPERATOR / PUBLICATION / RULE / SERVER / SUBSCRIPTION /
TEXT (SEARCH) / TRIGGER / MATERIALIZED VIEW.
- CREATE OR REPLACE VIEW
- CREATE RECURSIVE VIEW
- CREATE TEMP TABLE / VIEW / SEQUENCE and variants
- CREATE INDEX USING GIST / HASH / SPGIST / BRIN
- CREATE INDEX ... WHERE ... (partial indexes)
- CREATE INDEX ON ... (<complex expr>) (computed indexes)
- CREATE GROUP is really an alias for CREATE USER and is not "unsupported"
- type names point/circle/etc (unsupported pg data types)
- INTERVAL SECONDS / MINUTES / etc (interval type with unit qualifier)
- SELECT .. FOR UPDATE (and other locks)
- Geometric types: POINT, CIRCLE etc
- Other predefined pg types: XML, MACADDR, etc
- Full text search: CREATE TEXT SEARCH, types TSVECTOR, TSQUERY, etc
- modified:
- COMMENT ON accounting split in "table", "column" and other
- TIMETZ support accounting split in "data type" and "current_time"
- WITH RECURSIVE gets an issue number
Additionally unimplemented feature errors that stem during parsing
will now be prefixed with `syntax.` to ease integration in the feature
count hierarchy.
Release note: None
distsql: fix nil pointer in sort benchmarks
Sorter benchmarks were failing with nil pointer errors due to a missing disk monitor. Release note: None
Loading status checks…
sql: fold unimplemented/error telemetry into feature counters
This was discussed with @dt: use the feature counter machinery instead of using separate maps. This simplifies the code. Release note: None
sql: report unimplemented vtables in telemetry
Release note (sql change): CockroachDB will now collect references to tables in `information_schema` and `pg_catalog` which are not yet implemented, and report them as telemetry if statistics reporting is enabled. This will help determine which features should be implemented next for compatibility.
pgerror: hint what to do upon encountering unimplemented errors
Before: ``` root@127.0.0.1:28070/defaultdb> select * from information_schema.view_table_usage; pq: virtual schema table not implemented: information_schema.view_table_usage ``` After: ``` root@127.0.0.1:28070/defaultdb> select * from information_schema.view_table_usage; pq: virtual schema table not implemented: information_schema.view_table_usage HINT: This feature is not yet implemented in CockroachDB. Please check https://github.com/cockroachdb/cockroach/issues to check whether this feature is already tracked. If you cannot find it there, please report this error with example query at: https://github.com/cockroachdb/cockroach/issues/new/choose If you would rather not post publicly, please contact us directly at: support@cockroachlabs.com The Cockroach Labs team appreciates your feedback. ``` Release note: None
Loading status checks…
Merge pull request #31352 from benesch/backport2.1-30590
release-2.1: storage: eagerly queue undersize ranges for merging
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Verified
This commit was signed with a verified signature.
GPG key ID: F7386C5DEADABA7F
Learn about signing commits
Loading status checks…
storage: avoid merge deadlock when concurrent split wins
When merging two adjacent ranges P and Q, we need to be careful to delete Q's range descriptor with a conditional put, or we can deadlock with a concurrent split. See the comments and test case within for details. This commit fixes the last issue that is blocking merges from being turned on by default. Release note: None
Verified
This commit was signed with a verified signature.
GPG key ID: F7386C5DEADABA7F
Learn about signing commits
Loading status checks…
ui: Have the range debug page correctly handle missing lease times
Before this change, the value was always assumed to be not-null and it was null would crash. It will now correctly handled the missing value and display a `no timestamp` warning. Fixes #31260. Release note (bug fix): The range debug page will now correctly handle cases in which there is no lease start or expiration time.
Loading status checks…
Merge pull request #31348 from nvanbenschoten/backport2.1-31194
release-2.1: sql: bump SET CLUSTER SETTING gossip timeout
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31365 from benesch/backport2.1-30993
release-2.1: build: check out submodules before yarn install
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31366 from benesch/backport2.1-31294
release-2.1: storage: avoid merge deadlock when concurrent split wins
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31367 from BramGruneir/backport2.1-31362
release-2.1: ui: Have the range debug page correctly handle missing lease times
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
storage: Avoid using different qps measurements in StoreRebalancer
It's better to use the same measurement for everything, especially because it's the one that was used to compute the store's total QPS. Fixes #31303 Release note: None
Loading status checks…
Loading status checks…
Merge pull request #31357 from knz/backport2.1-31335-31356-31332-31333
release-2.1: assorted SQL telemetry fixes
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31379 from a-robinson/backport2.1-31324
release-2.1: storage: Avoid using different qps measurements in StoreRebalancer
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31381 from a-robinson/backport2.1-31227
release-2.1: storage: Jitter the StoreRebalancer loop's timing
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
testcluster: fully disable the merge queue in manual replication mode
The merge queue needs to be disabled via cluster setting (and not testing knob) in order for ALTER TABLE ... SPLIT AT to work. Release note: None
changefeedccl: add a test for many changefeeds watching the same table
Closes #31197 Release note: None
changefeedccl: test changefeed with unspecified primary key
If the user doesn't specify a primary key when making the table, we add one (a hidden `unique_rowid` column). This tests the behavior of a changefeed over one of these tables. Closes #31202 Release note: None
Loading status checks…
Merge pull request #31360 from solongordon/backport2.1-31208
release-2.1: distsql: fix nil pointer in sort benchmarks
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
storage: deflake TestLogMerges
This test needs the merge queue disabled. Fix #31061. Release note: None
storage: deflake TestStoreSetRangesMaxBytes
TestStoreSetRangesMaxBytes creates manual splits (using a horrendously outdated function, but that's a problem for another day), so it can't tolerate the merge queue. Release note: None
Merge pull request #31394 from benesch/backport2.1-29583
release-2.1: storage: re-enable the merge queue by default
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Commits on Oct 16, 2018
server(ccl)/ui: identify zone configs by zone name, not ID
Previously, the DataDistribution endpoint was returning a map of zone configs by zone config ID. However, zone config ID is not a unique identier within `crdb_internal.zones`, since subzones attached to partitions share the same ID (that of the top-level zone config). Zone names should be unique; this change uses those instead and updates the UI accordingly. This change also introduces a `serverccl` package for the unit test to live in, since testing this code path requires creating partitions, a CCL feature. Release note: None
Loading status checks…
storage: actually enable the merge queue
This got lost in the backport (#31394) due to a merge conflict. Release note: None
Verified
This commit was signed with a verified signature.
GPG key ID: F7386C5DEADABA7F
Learn about signing commits
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Merge pull request #31417 from vilterp/backport2.1-31407
release-2.1: server(ccl)/ui: identify zone configs by zone name, not ID
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
c-deps: bump CryptoPP to avoid SIGTRAP on macOS
Bump CryptoPP to pick up a fix for #31380. Details reproduced below. Fix #31380. --- As part of its CPU feature detection, CryptoPP installs a SIGILL signal handler before issuing the cpuid instruction. The intent is to gracefully degrade on CPUs that don't support the cpuid instruction. The problem is that it is impossible to safely overwrite a signal handler installed by the Go runtime in go1.10 on macOS (golang/go#22805). This causes CockroachDB 2.0 to crash on macOS Mojave: #31380. The situation has improved on the Go front, as go1.11 makes it possible to safely save and restore signal handlers installed by the Go runtime on macOS. Still, we can do better and support go1.10. There is no need to bother installing a SIGILL handler, as the cpuid instruction is supported by every x86-64 CPU. We can instead use conditional compilation to make sure that we never execute a cpuid instruction on a non x86-64 CPU. Note that CPU feature detection is performed at executable load time (see the attribute(constructor) on DetectX86Features); therefore any reference to function which calls DetectX86Features (notably HasAESNI) corrupts the signal handler. It's not entirely clear why this corruption later leads to the SIGTRAP seen in #31380--is something in macOS or the Go runtime generating a SIGILL and trying to handle it gracefully?--but regardless, not mucking with the signal handler fixes the issue. Release note (bug fix): CockroachDB no longer crashes due to a SIGTRAP error soon after startup on macOS Mojave (#31380).
Loading status checks…
Merge pull request #31520 from benesch/backport2.1-31516
release-2.1: c-deps: bump CryptoPP to avoid SIGTRAP on macOS
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
Commits on Oct 17, 2018
cdc: Fix Sink Retries Again
Another small error made in the implementation of sink retries - in order to provide a good UX for the CREATE CHANGEFEED statement, we want to immediately service sink-related errors to the user when the statement is executing. Once the changefeed job is created, however, we retry (and log) errors from the sink. In the previous implementation, this check was performed when the changefeed distsql processors were instantiated; however, this occurs inside of the "Resume" method, which can not easily tell if there is still a user statement waiting for feedback. Therefore, we were not retrying on some errors that we should have been retrying. With this change, the "canary" sink used to detect these errors is moved to the statement hook, which is only executed as part of the SQL statement and not as part of the job's Resume loop, and therefore is not subject to retries. Release note: Fixed a bug where changefeeds may not correctly retry temporary errors when communicating with a sink.
Loading status checks…
Verified
This commit was created on GitHub.com and signed with a verified signature using GitHub’s key.
GPG key ID: 4AEE18F83AFDEB23
Learn about signing commits
This file was deleted.