New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opt: queries with a gin index discard predicate #88047
Labels
branch-release-22.1
Used to mark release blockers and technical advisories for 22.1
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
C-technical-advisory
Caused a technical advisory
S-0-visible-logical-error
Database stores inconsistent data in some cases, or queries return invalid results silently.
T-sql-queries
SQL Queries Team
Projects
Comments
dbist
added
the
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
label
Sep 16, 2022
without artem@artem-mr-7xw.aws-us-east-1.cockroachlabs.cloud:26257/ferretdb_with_bug> SELECT gateway_region(), "_jsonb"->'location'->'address'->>'state' FROM sample_mflix.theaters_cf846063 WHERE "_jsonb"->'location'->'address' @> '{"state":"NY"}';
gateway_region | ?column?
-----------------+-----------
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY
aws-us-east-1 | NY |
msirek
pushed a commit
to msirek/cockroach
that referenced
this issue
Sep 17, 2022
Fixes cockroachdb#88047 Previously, a query which scans from a table with REGIONAL BY ROW partitioning utilizing an inverted index with an inverted constraint and locality-optimized search fails to apply the inverted constraint and may return wrong results. To address this, when locality-optimized search is built from an inverted constrained scan, the inverted constraint is copied into the local and remote scans of the locality-optimized search. Release note (bug fix): This patch fixes incorrect results from queries which utilize locality-optimized search on the inverted index of a table with REGIONAL BY ROW partitioning.
craig bot
pushed a commit
that referenced
this issue
Sep 18, 2022
88079: xform: fix wrong results from locality-optimized scan of inverted index r=msirek a=msirek Fixes #88047 Previously, a query which scans from a table with REGIONAL BY ROW partitioning utilizing an inverted index with an inverted constraint and locality-optimized search fails to apply the inverted constraint and may return wrong results. To address this, when locality-optimized search is built from an inverted constrained scan, the inverted constraint is copied into the local and remote scans of the locality-optimized search. Release note (bug fix): This patch fixes incorrect results from queries which utilize locality-optimized search on the inverted index of a table with REGIONAL BY ROW partitioning. Co-authored-by: Mark Sirek <sirek@cockroachlabs.com>
blathers-crl bot
pushed a commit
that referenced
this issue
Sep 18, 2022
Fixes #88047 Previously, a query which scans from a table with REGIONAL BY ROW partitioning utilizing an inverted index with an inverted constraint and locality-optimized search fails to apply the inverted constraint and may return wrong results. To address this, when locality-optimized search is built from an inverted constrained scan, the inverted constraint is copied into the local and remote scans of the locality-optimized search. Release note (bug fix): This patch fixes incorrect results from queries which utilize locality-optimized search on the inverted index of a table with REGIONAL BY ROW partitioning.
blathers-crl bot
pushed a commit
that referenced
this issue
Sep 18, 2022
Fixes #88047 Previously, a query which scans from a table with REGIONAL BY ROW partitioning utilizing an inverted index with an inverted constraint and locality-optimized search fails to apply the inverted constraint and may return wrong results. To address this, when locality-optimized search is built from an inverted constrained scan, the inverted constraint is copied into the local and remote scans of the locality-optimized search. Release note (bug fix): This patch fixes incorrect results from queries which utilize locality-optimized search on the inverted index of a table with REGIONAL BY ROW partitioning.
rytaft
added
the
S-0-visible-logical-error
Database stores inconsistent data in some cases, or queries return invalid results silently.
label
Sep 19, 2022
mgartner
added a commit
to mgartner/cockroach
that referenced
this issue
Oct 5, 2022
This commit adds an assertion to ensure that inverted index scans have inverted constraints. If they do not, there is a likely a bug that can cause incorrect query results (e.g., cockroachdb#88047). This assertion is made in release builds,not just test builds, because it is cheap to perform. Fixes cockroachdb#89440 Release note: None
craig bot
pushed a commit
that referenced
this issue
Oct 6, 2022
87763: changefeedccl: mark kv senderrors retryable r=samiskin a=samiskin Resolves #87300 Changefeeds can encounter senderrors during a normal upgrade procedure and therefore should retry. This was done in the kvfeed however is apparently not high level enough as a send error was still observed to cause a permanent failure. This PR moves the senderror checking to the top level IsRetryable check to handle it regardless of its source. Release justification: low risk important bug fix Release note (bug fix): Changefeeds will now never permanently error on a "failed to send RPC" error. 89445: opt: assert that inverted scans have inverted constraints r=mgartner a=mgartner This commit adds an assertion to ensure that inverted index scans have inverted constraints. If they do not, there is a likely a bug that can cause incorrect query results (e.g., #88047). This assertion is made in release builds,not just test builds, because it is cheap to perform. Fixes #89440 Release note: None 89482: roachtests: introduce admission-control/elastic-backup r=irfansharif a=irfansharif Informs #89208. This test sets up a 3-node CRDB cluster on 8vCPU machines running 1000-warehouse TPC-C with an aggressive (every 20m) full backup schedule. We've observed latency spikes during backups because of its CPU-heavy nature -- it can elevate CPU scheduling latencies which in turn translates to an increase in foreground latency. In #86638 we introduced admission control mechanisms to dynamically pace such work while maintaining acceptable CPU scheduling latencies (sub millisecond p99s). This roachtest exercises that machinery. In future commits we'll add libraries to the roachtest package to automatically spit out the degree to which {CPU-scheduler,foreground} latencies are protected. Release note: None Co-authored-by: Shiranka Miskin <shiranka.miskin@gmail.com> Co-authored-by: Marcus Gartner <marcus@cockroachlabs.com> Co-authored-by: irfan sharif <irfanmahmoudsharif@gmail.com>
blathers-crl bot
pushed a commit
that referenced
this issue
Oct 6, 2022
This commit adds an assertion to ensure that inverted index scans have inverted constraints. If they do not, there is a likely a bug that can cause incorrect query results (e.g., #88047). This assertion is made in release builds,not just test builds, because it is cheap to perform. Fixes #89440 Release note: None
blathers-crl bot
pushed a commit
that referenced
this issue
Oct 6, 2022
This commit adds an assertion to ensure that inverted index scans have inverted constraints. If they do not, there is a likely a bug that can cause incorrect query results (e.g., #88047). This assertion is made in release builds,not just test builds, because it is cheap to perform. Fixes #89440 Release note: None
This was referenced Oct 6, 2022
blathers-crl bot
pushed a commit
that referenced
this issue
Oct 6, 2022
This commit adds an assertion to ensure that inverted index scans have inverted constraints. If they do not, there is a likely a bug that can cause incorrect query results (e.g., #88047). This assertion is made in release builds,not just test builds, because it is cheap to perform. Fixes #89440 Release note: None
blathers-crl bot
pushed a commit
that referenced
this issue
Oct 6, 2022
This commit adds an assertion to ensure that inverted index scans have inverted constraints. If they do not, there is a likely a bug that can cause incorrect query results (e.g., #88047). This assertion is made in release builds,not just test builds, because it is cheap to perform. Fixes #89440 Release note: None
mgartner
added a commit
that referenced
this issue
Oct 13, 2022
This commit adds an assertion to ensure that inverted index scans have inverted constraints. If they do not, there is a likely a bug that can cause incorrect query results (e.g., #88047). This assertion is made in release builds,not just test builds, because it is cheap to perform. Fixes #89440 Release note: None
mgartner
added a commit
that referenced
this issue
Oct 13, 2022
This commit adds an assertion to ensure that inverted index scans have inverted constraints. If they do not, there is a likely a bug that can cause incorrect query results (e.g., #88047). This assertion is made in release builds,not just test builds, because it is cheap to perform. Fixes #89440 Release note: None
rytaft
added
C-technical-advisory
Caused a technical advisory
branch-release-22.1
Used to mark release blockers and technical advisories for 22.1
labels
Dec 6, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
branch-release-22.1
Used to mark release blockers and technical advisories for 22.1
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
C-technical-advisory
Caused a technical advisory
S-0-visible-logical-error
Database stores inconsistent data in some cases, or queries return invalid results silently.
T-sql-queries
SQL Queries Team
Describe the problem
Considering a jsonb column with a payload like
Having a GIN index on the column
Executing a query like
returns the following output
The incorrect result is returned irrelevant of the LIMIT.
Dropping the index
The result is incorrect again
The table has RBR locality
The table schema
The OPT for the select query
Expected behavior
The query should return all rows with state NY.
Environment:
cockroach sql
Jira issue: CRDB-19660
The text was updated successfully, but these errors were encountered: