Commit Graph

5317 Commits (6f5a343ff48489608d4b58e370c6324d39bbb2d0)

Author SHA1 Message Date
Önder Kalacı 6f5a343ff4
Make sure that enterprise tests pass (#5451) 2021-11-08 18:11:19 +03:00
Önder Kalacı 98ca6ba6ca
Allow lock_shard_resources to be called by the users with privileges (#5441)
Before this commit, we required the user to be owner of the shard/table
in order to call lock_shard_resources.

However, that is too restrictive. We can have users with GRANTS
to the table who are not owners of the tables/shards.

With this commit, we allow such patterns.
2021-11-08 15:36:51 +01:00
Hanefi Onaldi db613b2f5c
Merge pull request #5448 from citusdata/changelog-9.5.10 2021-11-08 16:50:12 +03:00
Hanefi Onaldi 7b63edfc83
Add changelog entries for 9.5.10 2021-11-08 16:41:47 +03:00
Önder Kalacı 3bce4d76d3
Merge pull request #5405 from citusdata/simplify_executor_locks
Simplify/Unify executor locks
2021-11-08 13:58:11 +01:00
Onder Kalaci d5e89b1132 Unify distributed execution logic for single replicated tables
Citus does not acquire any executor locks for shard replication == 1.
With this commit, we unify this decision and exit early.
2021-11-08 13:52:20 +01:00
Hanefi Onaldi 20f3248b6e
Merge pull request #5445 from citusdata/changelog-9.5.9 2021-11-08 14:09:53 +03:00
Hanefi Onaldi 3d49cbf9ab
Add changelog entries for 9.5.9 2021-11-08 13:19:10 +03:00
Önder Kalacı 65911ce162
Merge pull request #5397 from citusdata/naisila/fix-partitioned-index
Run fix_partition_shard_index_names after each wrong naming command
2021-11-08 11:09:08 +01:00
Önder Kalacı d5b371b2e0
Merge branch 'master' into naisila/fix-partitioned-index 2021-11-08 10:53:16 +01:00
Marco Slot 7f162ba834
Merge pull request #5444 from citusdata/marcocitus/remove-master_append_table_to_shard 2021-11-08 10:49:17 +01:00
naisila 385ba94d15 Run fix_partition_shard_index_names after each wrong naming command 2021-11-08 10:43:34 +01:00
Marco Slot 78866df13c Remove master_append_table_to_shard UDF 2021-11-08 10:43:24 +01:00
Marco Slot ee0cd75648
Merge pull request #5399 from citusdata/marcocitus/remove-append-copy 2021-11-07 21:09:26 +01:00
Marco Slot fba93df4b0 Remove copy into new append shard logic 2021-11-07 21:01:40 +01:00
Marco Slot 27ba19f7e1 Fix a flappy test in drop_column_partitioned_table 2021-11-07 18:25:44 +01:00
Nils Dijk 3fcb456381
Refactor/partitioned result destreceiver (#5432)
This change creates a slightly higher abstraction of the `PartitionedResultDestReceiver` where it decouples the partitioning from writing it to a file. This allows for easier reuse for other `DestReceiver`'s that would like to route different tuples to different `DestReceiver`'s.

Originally there was a lot of state kept in `PartitionedResultDestReceiver` to be able to lazily create `FileDestReceivers` when the first tuple arrived for that target. This convoluted the implementation of the processing of tuples with where they should go.

This refactor changes that where it makes the `PartitionedResultDestReceiver` completely agnostic of what kind of Receivers it is writing to. When constructed you pass it a list of `DestReceiver` compatible pointers with the length of `partitionCount`. Internally the `PartitionedResultDestReceiver` keeps track of which `DestReceiver`'s have been started or not, and start them when they first receive a tuple.

Alternatively, if the instantiating code of the `PartitionedResultDestReceiver` wants, the startup can be turned from lazily to eagerly. When the startup is eager (not lazy) all `rStartup` functions on the list of `DestReceiver`'s are called during the startup of the `PartitionedResultDestReceiver` and marked as such.

A downside of this approach is the following. On highly partitioned destinations we now need to allocate a `FileDestReceiver` for every target, _always_. When the data passed into the `PartitionedResultDestReceiver` is highly skewed to a small set of `FileDestReceiver`'s this will waste some memory. Given the small size of a `FileDestReceiver`, and the fact that actual file handles are only created during the processing of the startup of the `FileDestReceiver` I think this memory waste is not a problem. If this would become a problem we could refactor the source list into some kind of generator object which can generate the `DestReceiver`'s on the fly.
2021-11-05 13:31:18 +01:00
Nils Dijk 0e7cf9f0ca
reinstate optimization that got unintentionally broken in 366461ccdb (#5418)
DESCRIPTION: Reinstate optimisation for uniform shard interval ranges

During a refactor introduced in #4132 the following change was made, which made the optimisation in `CalculateUniformHashRangeIndex` unreachable: 
366461ccdb (diff-565a339ed3c78bc5a0d4ffeb4e91032150b1dffbeeff59cd3e65981d20b998c7L319-R319)

This PR reinstates the path to the optimisation!
2021-11-05 13:07:51 +01:00
Önder Kalacı 763176a4d9
Some minor improvements on top of 5314 (#5428)
* Refactor some checks in citus local tables

* all existing citus local tables are auto converted after upgrade

* Update warning messages in CreateCitusLocalTable

* Hide notice msg for auto converting local tables

* Hide hint msg

Co-authored-by: Ahmet Gedemenli <afgedemenli@gmail.com>
2021-11-05 13:59:13 +03:00
Sait Talha Nisanci ab29c25658 Fix missing from entry 2021-11-04 18:54:52 +03:00
Halil Ozan Akgül a23f1fb259
Merge pull request #5417 from citusdata/fix_isolation_schedule_with_mx
Turns mx on in isolations tests
2021-11-04 17:18:50 +03:00
Halil Ozan Akgul a8f3f712cc Turns mx on in isolations tests 2021-11-04 17:12:30 +03:00
Ahmet Gedemenli b30ed46068
Fixes ALTER STATISTICS IF EXISTS bug (#5435)
* Fix ALTER STATISTICS IF EXISTS bug
2021-11-04 16:14:05 +03:00
Onur Tirtir 7597e5aee9
Merge pull request #5433 from citusdata/cl-928
Add changelog for 9.2.8
2021-11-04 15:08:01 +03:00
Onur Tirtir 4b598da672 Add changelog for 9.2.8 2021-11-04 14:56:29 +03:00
Halil Ozan Akgül 9bfff4ba8d
Merge pull request #5391 from citusdata/fix_multi_cluster_management_with_mx
Fix multi cluster management with metadata syncing enabled
2021-11-04 12:01:24 +03:00
Halil Ozan Akgul 91b377490b Fix multi_cluster_management fails for metadata syncing 2021-11-04 11:09:21 +03:00
Talha Nisanci 19f28eabae
Fix citus upgrade local run issues (#5414)
This PR is fixing 2 separate issues related to the local run of citus upgrade tests.

d3e7c825ab fixes the issue that, with our new testing infrastructure, we moved/renamed some of existing folders. This created a problem for local runs of citus upgrade tests since some paths were sensitive to such changes. This commit tries to make it more generic so that this issue is less likely to happen in the future, while also fixing the current issue.

93de6b60c3 we are fixing an issue that a new environment variable was added for citus upgrade tests, which is defined in the CI. 0cb51f8c37/.circleci/config.yml (L294)
This environment variable wasn't set in our local runs hence it would create problems. Instead of defining this environment variable in the local run, we change the citus_upgrade run command to use an existing env variable, which is now also set in the CI.
2021-11-03 16:17:36 +03:00
Jelte Fennema 9b784e58bf
Add tests for special hash values (#5431)
We fixed some crashes a while back that would only occur in cases where
the value of a distribution column would have result in a high or a very
low hash value. This adds a regression test for those crashes.
2021-11-03 13:42:39 +01:00
Jelte Fennema 0cb51f8c37
Test a query that failed on 9.5.8 when coordinator is in metadata (#5412)
This test starts passing because of PR #4508, to be precise commit:
24e60b44a1

When I undo that commit this newly added test starts failing. This adds
this test to make sure we don't regress on this again.
2021-11-03 12:27:28 +01:00
Onur Tirtir d691148e7e
Merge pull request #5430 from citusdata/cl-927
Add changelog for 9.2.7
2021-11-03 12:06:29 +03:00
Onur Tirtir 2535d15121 Add changelog for 9.2.7 2021-11-03 11:13:54 +03:00
Halil Ozan Akgül 187ec01dd6
Merge pull request #5402 from citusdata/remove_ensure_coordinator_from_metadata_sync
Remove EnsureSuperUser from StartMetadataSyncToNode
2021-11-01 18:11:29 +03:00
Halil Ozan Akgul c0785d570c Remove EnsureSuperUser from start and stop metadata sync to node 2021-11-01 18:01:49 +03:00
Halil Ozan Akgül a350feb13c
Merge pull request #5403 from citusdata/reuse_to_be_deleted_connection_in_same_transaction
Don't skip connections with forceCloseAtTransactionEnd that Sent Begin in FindAvailableConnection
2021-11-01 17:59:40 +03:00
Halil Ozan Akgul c0eb67b24f Skip forceCloseAtTransactionEnd connections only if BEGIN was not sent on them 2021-11-01 17:43:04 +03:00
Jelte Fennema 57a0228c52
Fix string-concatenation warning on Clang 13 (#5425)
Clang 13 complains about a suspicious string concatenation. It thinks we
might have missed a comma. This adds parentheses to make it clear that
concatenation is indeed what we meant.
2021-11-01 13:55:43 +03:00
Marco Slot 53882f4723
Merge pull request #5268 from citusdata/renaming 2021-10-30 10:03:27 +02:00
naisila 796d56a7b1 Rename ddlJob->commandString to ddlJob->metadataSyncCommand 2021-10-29 23:45:43 +03:00
Jelte Fennema b19979fda5
Update install command to work on Ubuntu 20.04 (#5362)
libxslt-dev was renamed to libxslt1-dev in Ubuntu 20.04. This is also an
alias for this package on Ubuntu 18.04, so this new command works there
too.
2021-10-28 04:13:09 -07:00
Ahmet Gedemenli 67dca4363d
Dont auto-undistribute user-added citus local tables (#5314)
* Disable auto-undistribute for user-added citus local tables
2021-10-28 12:10:26 +03:00
Nils Dijk f4297f774a
Bump mitmproxy version (#5334)
There is a vulnerability in mitmproxy with the version we are using.

It would be hard to exploit anything with regards to the artifacts we ship as its only used in our test suite. Still its good hygiene to _not_ use software with known vulnerabilities.

This PR updates the version of python, mitmproxy and the crypto libraries used.
The latest version of mitmproxy for python 3.6 is not patched, hence the upgrade of python.
For our CI images this cascades into upgrading debian as well :)

For CI we bake these versions in our images so we need to update them as well.

Changes to the CI images: https://github.com/citusdata/the-process/pull/65
2021-10-27 17:57:13 +02:00
Jelte Fennema a8cbeb1047
Fix docs of arbitrary configs (#5413)
The old command would run none of the tests. The new command runs all of
the tests for the given configs.
2021-10-27 17:16:24 +02:00
Philip Dubé 44204ec9f1
Merge pull request #5401 from citusdata/fix-typos
Fix typos. Spurred spotting "connectios" in logs
2021-10-25 15:33:16 +00:00
Philip Dubé cc50682158 Fix typos. Spurred spotting "connectios" in logs 2021-10-25 13:54:09 +00:00
Jelte Fennema 3bdbfc3edf
Fix duplicate typedef which can cause compile failures (#5406)
ColumnarScanDesc is already defined in columnar_tableam.h. Redifining it
again causes a compiler error on some C compilers.

Useful reference: https://bugzilla.redhat.com/show_bug.cgi?id=767538

Fixes #5404
2021-10-25 12:20:13 +00:00
Önder Kalacı fc00ddee4e
Merge pull request #5386 from citusdata/simplify_2pc_decision
Simplify 2PC decision in the executor
2021-10-23 09:35:22 +02:00
Onder Kalaci ce4c4540c5 Simplify 2PC decision in the executor
It seems like the decision for 2PC is more complicated than
it should be.

With this change, we do one behavioral change. In essense,
before this commit, when a SELECT task with replication factor > 1
is executed, the executor was triggering 2PC. And, in fact,
the transaction manager (`ConnectionModifiedPlacement()`) was
able to understand not to trigger 2PC when no modification happens.

However, for transaction blocks like:
BEGIN;
-- a command that triggers 2PC
-- A SELECT command on replication > 1
..
COMMIT;

The SELECT was used to be qualified as required 2PC. And, as a side-effect
the executor was setting `xactProperties.errorOnAnyFailure = true;`

So, the commands was failing at the time of execution. Now, they fail at
the end of the transaction.
2021-10-23 09:06:28 +02:00
Önder Kalacı 8664e6873f
Merge pull request #5381 from citusdata/do_not_mark_placements_invalid
Drop support Inactive Shard States
2021-10-23 09:04:50 +02:00
Onder Kalaci 575bb6dde9 Drop support for Inactive Shard placements
Given that we do all operations via 2PC, there is no way
for any placement to be marked as INACTIVE.
2021-10-22 18:03:35 +02:00