Commit Graph

6760 Commits (576264ceca5f9cee0825f8d2a5523004592a888b)

Author SHA1 Message Date
gindibay 576264ceca Fixes UTF error 2023-10-13 14:17:13 +03:00
gindibay 3050b0eab9 Fixes pg15 tests 2023-10-13 14:17:13 +03:00
gindibay 214ebc4374 Fixes encodings for pg16 2023-10-13 14:17:13 +03:00
gindibay 6f36556724 Revert "Removes pg15 changes to test unusal failures"
This reverts commit 85963e9cb5.
2023-10-13 14:17:13 +03:00
gindibay a7112fb965 Adds tablespace to test tablespace statement 2023-10-13 14:17:13 +03:00
gindibay 6913496f42 Fixes tests 2023-10-13 14:17:13 +03:00
gindibay 94abb07409 Fixes indentation 2023-10-13 14:17:13 +03:00
gindibay 1f578791bb Fixes pg_dist_object delete problem 2023-10-13 14:17:13 +03:00
gindibay 51d1560b34 Adds OID to see the error cause 2023-10-13 14:17:13 +03:00
gindibay c3d773ac6f Changes test order 2023-10-13 14:17:13 +03:00
gindibay 1d9c02fab9 Changes schedule location 2023-10-13 14:17:13 +03:00
gindibay 5eb87839b6 Rollbacks last test 2023-10-13 14:17:13 +03:00
gindibay acece9818c Rollbacks pg_regress_multi 2023-10-13 14:17:13 +03:00
gindibay c7304abd54 Fixes pg15 file 2023-10-13 14:17:13 +03:00
gindibay 14618878c8 Tests error cause 2023-10-13 14:17:13 +03:00
gindibay 29093e042a Removes pg15 changes to test unusal failures 2023-10-13 14:17:13 +03:00
gindibay aa47ca8bda Fixes tablespace results 2023-10-13 14:17:13 +03:00
gindibay 4c79788936 Fixes tablespace error 2023-10-13 14:17:13 +03:00
gindibay b01c9ffb45 Removes unnecessary fileds from selects 2023-10-13 14:17:13 +03:00
gindibay d0bd20c9b1 Fixes tests 2023-10-13 14:17:13 +03:00
gindibay 25488afccd Changes encoding 2023-10-13 14:17:13 +03:00
gindibay a5e0b9411a Adds tests for create and drop database 2023-10-13 14:17:13 +03:00
gindibay 8c98369e21 Fixes affected tests 2023-10-13 14:17:13 +03:00
gindibay 5c50d58757 Changes EnableCreateDatabasePropagation to false
to fix failing tests
2023-10-13 14:17:13 +03:00
gindibay 3735bef156 Fixes sql comments 2023-10-13 14:17:13 +03:00
gindibay cef9ac702e Fixes indentation 2023-10-13 14:17:13 +03:00
gindibay 1e7c18cb61 Removes unnecessary code 2023-10-13 14:17:13 +03:00
gindibay 40893e6ffc Removes unnecessary files 2023-10-13 14:17:13 +03:00
gindibay eb1f093381 Fixes runtime and compile errors 2023-10-13 14:17:13 +03:00
gindibay ca36833b5c Fix for Pg16 compile error 2023-10-13 14:16:43 +03:00
gindibay bd398a627b Fixes compile errors 2023-10-13 14:16:43 +03:00
gindibay 39cb7977ce Fixes additional compile errors 2023-10-13 14:16:43 +03:00
gindibay 0d5c2f9350 Adds first commit 2023-10-13 14:16:43 +03:00
Onur Tirtir 5eaf6c221e
Fix flaky test detection job (#7256)
We were getting such errors in flaky-test detection job:
```
Unable to process file command 'output' successfully
```

Even though we don't seem to be writing multiple lines to
$GITHUB_OUTPUT, this seems to be the right fix.

https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
2023-10-16 14:20:55 +03:00
Jelte Fennema-Nio 788e09a39a
Add a test for citus_shards where table names have spaces (#7224)
There was a bug reported for previous versions of Citus where
shard\_size was returning NULL for tables with spaces in them. It works
fine on the main branch though, but I'm still adding a test for this to
the main branch because it seems a good test to have.
2023-10-16 11:38:24 +02:00
Nils Dijk fb08f9b198
Remove software-properties-common from dev container after use (#7255)
During the creation of the devcontainer we need to add a ppa repository,
which is easiest done via software-properies-common. As turns out this
installes pkexec into the container as a side effect.

When vscode tries to attach a debugger it first checks if pkexec is
installed as this gives a nicer popup asking for elevation of rights to
attach to the process. However, since dev containers don't have a
windowing system running pkexec isn't working as expected and thus
prevents the debugger from attaching.

Without pkexec in the container vscode 'falls back' to plain old sudo
which we can run passwordless in the container.

For pkexec to be removed we need to first purge
software-propertied-common as well as autoremove all packages that were
installed due to the installation of said package. By performing this
all in one step we minimize the size of the layer we are creating.
2023-10-12 17:47:44 +02:00
Gokhan Gulbiz e0b0cdbb87
CircleCI to GHA migration (#7154)
Co-authored-by: Hanefi Onaldi <Hanefi.Onaldi@microsoft.com>
2023-10-10 16:58:50 +03:00
Emel Şimşek e9035f6d32
Send keepalive messages in split decoder periodically to avoid wal receiver timeouts during large shard splits. (#7229)
DESCRIPTION: Send keepalive messages during the logical replication
phase of large shard splits to avoid timeouts.

During the logical replication part of the shard split process, split
decoder filters out the wal records produced by the initial copy. If the
number of wal records is big, then split decoder ends up processing for
a long time before sending out any wal records through pgoutput. Hence
the wal receiver may time out and restarts repeatedly causing our split
driver code catch up logic to fail.

Notes: 

1. If the wal_receiver_timeout is set to a very small number e.g. 600ms,
it may time out before receiving the keepalives. My tests show that this
code works best when the` wal_receiver_timeout `is set to 1minute, which
is the default value.

2. Once a logical replication worker time outs, a new one gets launched.
The new logical replication worker sets the pg_stat_subscription columns
to initial values. E.g. the latest_end_lsn is set to 0. Our driver logic
in `WaitForGroupedLogicalRepTargetsToCatchUp` can not handle LSN value
to go back. This is the main reason for it to get stuck in the infinite
loop.
2023-10-09 22:33:08 +03:00
Nils Dijk 76fdfa3c0f
Add devcontainer for development purposes (#7102)
This change adds a devcontainer configuration to the Citus project. This
devcontainer allows for quick generation of isolated development
environments, either local on the machine of a developer or in a cloud,
like github codepaces.

The devcontainer is updated automatically by github actions when its
configuration changes.

For more detailed instructions on how to quickstart the development in a
container see CONTRIBUTING.md
2023-10-09 15:37:21 +02:00
Nils Dijk 6d8725efb0
Fix leaking of memory and memory contexts in Foreign Constraint Graphs (#7236)
DESCRIPTION: Fix leaking of memory and memory contexts in Foreign
Constraint Graphs

Previously, every time we (re)created the Foreign Constraint
Relationship Graph, we created a new Memory Context while loosing a
reference to the previous context. This old context could still have
left over memory in there causing a memory leak.

With this patch we statically have one memory context that we lazily
initialize the first time we create our foreign constraint relationship
graph. On every subsequent creation, beside destroying our previous
hashmap we also reset our memory context to remove any left over
references.
2023-10-09 13:05:51 +02:00
Onur Tirtir 858d99be33
Take improvement_threshold into the account in citus_add_rebalance_strategy() (#7247)
DESCRIPTION: Makes sure to take improvement_threshold into the account
in `citus_add_rebalance_strategy()`.

Fixes https://github.com/citusdata/citus/issues/7188.
2023-10-09 13:13:08 +03:00
Önder Kalacı 7d6c401dd3
Update technical readme (#7248)
Fix a wrong query, reported by @naisila
2023-10-06 13:37:37 +03:00
Önder Kalacı 0dca65c84d
Addd missing image to Technical Readme (#7243)
DESCRIPTION: PR description that will go into the change log, up to 78
characters
2023-09-29 22:24:10 +02:00
Önder Kalacı 185ac5e01e
Citus Technical Readme (#7207)
This commit aims to add a comprehensive guide that covers all essential
aspects of Citus, including planning, execution, locking mechanisms,
shard moves, 2PC, and many other major components of Citus.

Co-authored-by: Marco Slot <marco.slot@gmail.com>
2023-09-29 16:50:52 +03:00
dependabot[bot] c323f49e83
Bump cryptography from 41.0.3 to 41.0.4 in /src/test/regress (#7231)
Bumps [cryptography](https://github.com/pyca/cryptography) from 41.0.3
to 41.0.4.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nils Dijk <nils@citusdata.com>
2023-09-27 15:36:58 +02:00
Onur Tirtir 27ac44eb2a
Fix mixed Citus upgrade tests (#7218)
When testing rolling Citus upgrades, coordinator should not be upgraded
until we upgrade all the workers.

---------

Co-authored-by: Jelte Fennema-Nio <github-tech@jeltef.nl>
2023-09-26 17:52:52 +03:00
Nils Dijk b87fbcbf79
Shard moves/isolate report LSN's in lsn format (#7227)
DESCRIPTION: Shard moves/isolate report LSN's in lsn format

While investigating an issue with our catchup mechanism on certain
postgres versions we noticed we print LSN's in the format of the native
long type. This is an uncommon representation for LSN's in postgres
logs.

This patch changes the output of our log message to go from the long
type representation to the native LSN type representation. Making it
easier for postgres users to recognize and compare LSN's with other
related reports.

example of new output:
```
2023-09-25 17:28:47.544 CEST [11345] LOG:  The LSN of the target subscriptions on node localhost:9701 have increased from 0/0 to 0/E1ED20F8 at 2023-09-25 17:28:47.544165+02 where the source LSN is 1/415DCAD0
```
2023-09-26 13:47:50 +02:00
Gürkan İndibay 7fa109c977
Adds alter user missing features (#7204)
DESCRIPTION: Adds alter user rename propagation and enriches alter user
tests

---------

Co-authored-by: Jelte Fennema <github-tech@jeltef.nl>
2023-09-26 12:28:07 +03:00
Gürkan İndibay a9d28ca96f
Adds make clean to installation steps (#7052)
If you make a fresh install make clean is not
required. However, if you install before, without
a make install, one can get errors


---------

Co-authored-by: aykut-bozkurt <51649454+aykut-bozkurt@users.noreply.github.com>
2023-09-25 12:42:23 +03:00
Onur Tirtir 111b4c19bc
Make sure to disallow creating a replicated distributed table concurrently (#7219)
See explanation in https://github.com/citusdata/citus/issues/7216.
Fixes https://github.com/citusdata/citus/issues/7216.

DESCRIPTION: Makes sure to disallow creating a replicated distributed
table concurrently
2023-09-25 11:14:35 +03:00