Run linter to use the new editorconfig rules

It is not so easy to use a linter on all the rules as the tool I used
fails to honor .gitignore files. It ends up checking many generated
files and comes up with many false errors.

I used the following commands to check rules and attempt to fix all
problems:

- `git ls-files | xargs eclint check`
- `git ls-files | xargs eclint fix`

However, eclint was not able to fix all the problems for me
automatically. I used the check command output and fixed them by hand.
pull/6656/head
Hanefi Onaldi 2023-01-26 11:36:10 +03:00
parent a97478a85d
commit 5862926517
No known key found for this signature in database
GPG Key ID: F18CDB10BA0DFDC7
132 changed files with 3114 additions and 3137 deletions

View File

@ -29,4 +29,3 @@ hint_on_fail() {
exit $exit_code exit $exit_code
} }
trap hint_on_fail EXIT trap hint_on_fail EXIT

View File

@ -0,0 +1 @@

View File

@ -22,4 +22,3 @@ configure -whitespace
# all C files (implementation and header) use our style... # all C files (implementation and header) use our style...
*.[ch] citus-style *.[ch] citus-style

View File

@ -28,5 +28,3 @@ ALTER EXTENSION citus_columnar ADD VIEW columnar.chunk;
ALTER FUNCTION citus_internal.upgrade_columnar_storage(regclass) SET SCHEMA columnar_internal; ALTER FUNCTION citus_internal.upgrade_columnar_storage(regclass) SET SCHEMA columnar_internal;
ALTER FUNCTION citus_internal.downgrade_columnar_storage(regclass) SET SCHEMA columnar_internal; ALTER FUNCTION citus_internal.downgrade_columnar_storage(regclass) SET SCHEMA columnar_internal;
ALTER FUNCTION citus_internal.columnar_ensure_am_depends_catalog() SET SCHEMA columnar_internal; ALTER FUNCTION citus_internal.columnar_ensure_am_depends_catalog() SET SCHEMA columnar_internal;

View File

@ -4,4 +4,3 @@ vacuum_freeze_min_age = 50000
vacuum_freeze_table_age = 50000 vacuum_freeze_table_age = 50000
synchronous_commit = off synchronous_commit = off
fsync = off fsync = off

View File

@ -49,4 +49,3 @@ print "node one count: $result\n";
is($result, qq(t), 'columnar table was frozen'); is($result, qq(t), 'columnar table was frozen');
$node_one->stop('fast'); $node_one->stop('fast');

View File

@ -49,4 +49,3 @@ print "node one count: $result\n";
is($result, qq(t), 'columnar table was frozen'); is($result, qq(t), 'columnar table was frozen');
$node_one->stop('fast'); $node_one->stop('fast');

View File

@ -67,5 +67,3 @@ fi
# create cluster and run the hammerd benchmark # create cluster and run the hammerd benchmark
./create-run.sh ./create-run.sh

View File

@ -292,4 +292,3 @@ clean distclean maintainer-clean:
rm -rf input/ output/ rm -rf input/ output/
rm -rf tmp_check/ rm -rf tmp_check/
rm -rf tmp_citus_test/ rm -rf tmp_citus_test/

View File

@ -51,4 +51,3 @@ then
else else
exec "$DIFF" -w $args "$file1" "$file2" exec "$DIFF" -w $args "$file1" "$file2"
fi fi

View File

@ -0,0 +1 @@

View File

@ -1167,6 +1167,4 @@ if ($exitcode == 0) {
} }
else { else {
die "Failed in ". ($endTime - $startTime)." seconds. \n"; die "Failed in ". ($endTime - $startTime)." seconds. \n";
} }

View File

@ -114,4 +114,3 @@ permutation "s1-insert" "s1-begin" "s2-begin" "s2-select" "s1-move-placement" "s
permutation "s1-begin" "s2-begin" "s2-copy" "s1-move-placement" "s2-end" "s1-end" "s1-select" "s1-get-shard-distribution" permutation "s1-begin" "s2-begin" "s2-copy" "s1-move-placement" "s2-end" "s1-end" "s1-select" "s1-get-shard-distribution"
permutation "s1-insert" "s1-begin" "s2-begin" "s2-truncate" "s1-move-placement" "s2-end" "s1-end" "s1-select" "s1-get-shard-distribution" permutation "s1-insert" "s1-begin" "s2-begin" "s2-truncate" "s1-move-placement" "s2-end" "s1-end" "s1-select" "s1-get-shard-distribution"
permutation "s1-begin" "s2-begin" "s2-alter-table" "s1-move-placement" "s2-end" "s1-end" "s1-select" "s1-get-shard-distribution" permutation "s1-begin" "s2-begin" "s2-alter-table" "s1-move-placement" "s2-end" "s1-end" "s1-select" "s1-get-shard-distribution"

View File

@ -126,4 +126,3 @@ permutation "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker"
permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-update" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-select" "s1-get-shard-distribution" "s2-stop-connection" permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-update" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-select" "s1-get-shard-distribution" "s2-stop-connection"
permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-delete" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-select" "s1-get-shard-distribution" "s2-stop-connection" permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-delete" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-select" "s1-get-shard-distribution" "s2-stop-connection"
permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-select" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-get-shard-distribution" "s2-stop-connection" permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-select" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-get-shard-distribution" "s2-stop-connection"

View File

@ -100,4 +100,3 @@ permutation "s1-insert" "s1-begin" "s2-begin" "s2-update" "s1-move-placement" "s
permutation "s1-insert" "s1-begin" "s2-begin" "s2-delete" "s1-move-placement" "s2-end" "s1-end" "s1-select" "s1-get-shard-distribution" permutation "s1-insert" "s1-begin" "s2-begin" "s2-delete" "s1-move-placement" "s2-end" "s1-end" "s1-select" "s1-get-shard-distribution"
permutation "s1-insert" "s1-begin" "s2-begin" "s2-select" "s1-move-placement" "s2-end" "s1-end" "s1-get-shard-distribution" permutation "s1-insert" "s1-begin" "s2-begin" "s2-select" "s1-move-placement" "s2-end" "s1-end" "s1-get-shard-distribution"
permutation "s1-insert" "s1-begin" "s2-begin" "s2-select-for-update" "s1-move-placement" "s2-end" "s1-end" "s1-get-shard-distribution" permutation "s1-insert" "s1-begin" "s2-begin" "s2-select-for-update" "s1-move-placement" "s2-end" "s1-end" "s1-get-shard-distribution"

View File

@ -130,4 +130,3 @@ permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin
permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-delete" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-select" "s1-get-shard-distribution" "s2-stop-connection" permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-delete" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-select" "s1-get-shard-distribution" "s2-stop-connection"
permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-select" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-get-shard-distribution" "s2-stop-connection" permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-select" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-get-shard-distribution" "s2-stop-connection"
permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-select-for-update" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-get-shard-distribution" "s2-stop-connection" permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-select-for-update" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-get-shard-distribution" "s2-stop-connection"

View File

@ -134,4 +134,3 @@ permutation "s2-begin" "s2-create_distributed_table" "s1-split-block" "s2-commi
// same test above, but this time implicitly colocated tables // same test above, but this time implicitly colocated tables
permutation "s4-begin" "s4-move-shard-logical" "s5-setup-rep-factor" "s5-create_implicit_colocated_distributed_table" "s4-commit" "s3-sanity-check" "s3-sanity-check-3" "s3-sanity-check-4" permutation "s4-begin" "s4-move-shard-logical" "s5-setup-rep-factor" "s5-create_implicit_colocated_distributed_table" "s4-commit" "s3-sanity-check" "s3-sanity-check-3" "s3-sanity-check-4"
permutation "s4-begin" "s4-move-shard-block" "s5-setup-rep-factor" "s5-create_implicit_colocated_distributed_table" "s4-commit" "s3-sanity-check" "s3-sanity-check-3" "s3-sanity-check-4" permutation "s4-begin" "s4-move-shard-block" "s5-setup-rep-factor" "s5-create_implicit_colocated_distributed_table" "s4-commit" "s3-sanity-check" "s3-sanity-check-3" "s3-sanity-check-4"

View File

@ -50,4 +50,3 @@ permutation "s1-begin" "s1-insert" "s2-vacuum-analyze"(*) "s2-wait" "s1-commit"
// INSERT and VACUUM FULL should block each other. // INSERT and VACUUM FULL should block each other.
permutation "s1-begin" "s1-insert" "s2-vacuum-full" "s1-commit" permutation "s1-begin" "s1-insert" "s2-vacuum-full" "s1-commit"

View File

@ -149,4 +149,3 @@ permutation "s1-insert" "s1-begin" "s2-begin" "s2-select" "s1-move-placement" "s
permutation "s1-begin" "s2-begin" "s2-copy" "s1-move-placement" "s2-end" "s1-end" "s1-select" "s1-get-shard-distribution" permutation "s1-begin" "s2-begin" "s2-copy" "s1-move-placement" "s2-end" "s1-end" "s1-select" "s1-get-shard-distribution"
permutation "s1-insert" "s1-begin" "s2-begin" "s2-truncate" "s1-move-placement" "s2-end" "s1-end" "s1-select" "s1-get-shard-distribution" permutation "s1-insert" "s1-begin" "s2-begin" "s2-truncate" "s1-move-placement" "s2-end" "s1-end" "s1-select" "s1-get-shard-distribution"
permutation "s1-begin" "s2-begin" "s2-alter-table" "s1-move-placement" "s2-end" "s1-end" "s1-select" "s1-get-shard-distribution" permutation "s1-begin" "s2-begin" "s2-alter-table" "s1-move-placement" "s2-end" "s1-end" "s1-select" "s1-get-shard-distribution"

View File

@ -128,4 +128,3 @@ permutation "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker"
permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-update" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-select" "s1-get-shard-distribution" "s2-stop-connection" permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-update" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-select" "s1-get-shard-distribution" "s2-stop-connection"
permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-delete" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-select" "s1-get-shard-distribution" "s2-stop-connection" permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-delete" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-select" "s1-get-shard-distribution" "s2-stop-connection"
permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-select" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-get-shard-distribution" "s2-stop-connection" permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-select" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-get-shard-distribution" "s2-stop-connection"

View File

@ -132,4 +132,3 @@ permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin
permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-delete" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-select" "s1-get-shard-distribution" "s2-stop-connection" permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-delete" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-select" "s1-get-shard-distribution" "s2-stop-connection"
permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-select" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-get-shard-distribution" "s2-stop-connection" permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-select" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-get-shard-distribution" "s2-stop-connection"
permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-select-for-update" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-get-shard-distribution" "s2-stop-connection" permutation "s1-insert" "s1-begin" "s2-start-session-level-connection" "s2-begin-on-worker" "s2-select-for-update" "s1-move-placement" "s2-commit-worker" "s1-commit" "s1-get-shard-distribution" "s2-stop-connection"

View File

@ -136,5 +136,3 @@ permutation "s1-begin" "s1-move-placement-single-partition" "s2-truncate-partiti
permutation "s1-begin" "s1-move-placement-single-partition" "s2-alter-table-partitioned" "s1-end" permutation "s1-begin" "s1-move-placement-single-partition" "s2-alter-table-partitioned" "s1-end"
permutation "s1-begin" "s2-truncate-partitioned" "s1-move-placement-single-partition" "s1-end" permutation "s1-begin" "s2-truncate-partitioned" "s1-move-placement-single-partition" "s1-end"
permutation "s1-begin" "s2-alter-table-partitioned" "s1-move-placement-single-partition" "s1-end" permutation "s1-begin" "s2-alter-table-partitioned" "s1-move-placement-single-partition" "s1-end"

View File

@ -82,4 +82,3 @@ permutation "s1-begin" "s2-begin" "s2-modify_with_subquery_v1" "s1-delete_events
permutation "s1-begin" "s2-begin" "s1-insert_to_events_test_table" "s2-modify_with_subquery_v1" "s1-commit" "s2-commit" permutation "s1-begin" "s2-begin" "s1-insert_to_events_test_table" "s2-modify_with_subquery_v1" "s1-commit" "s2-commit"
permutation "s1-begin" "s2-begin" "s1-update_events_test_table" "s2-modify_with_subquery_v1" "s1-commit" "s2-commit" permutation "s1-begin" "s2-begin" "s1-update_events_test_table" "s2-modify_with_subquery_v1" "s1-commit" "s2-commit"
permutation "s1-begin" "s2-begin" "s1-delete_events_test_table" "s2-modify_with_subquery_v1" "s1-commit" "s2-commit" permutation "s1-begin" "s2-begin" "s1-delete_events_test_table" "s2-modify_with_subquery_v1" "s1-commit" "s2-commit"

View File

@ -129,4 +129,3 @@ permutation "s2-add-fkey" "s3-acquire-advisory-lock" "s1-insert-referenced" "s1-
permutation "s2-add-fkey" "s3-acquire-advisory-lock" "s1-insert-referenced" "s1-insert-referencing" "s2-begin" "s2-move-placement-nonblocking" "s1-update" "s3-release-advisory-lock" "s2-commit" "s2-print-cluster" permutation "s2-add-fkey" "s3-acquire-advisory-lock" "s1-insert-referenced" "s1-insert-referencing" "s2-begin" "s2-move-placement-nonblocking" "s1-update" "s3-release-advisory-lock" "s2-commit" "s2-print-cluster"
permutation "s2-add-fkey" "s3-acquire-advisory-lock" "s1-insert-referenced" "s1-insert-referencing" "s2-begin" "s2-move-placement-nonblocking" "s1-ddl" "s3-release-advisory-lock" "s2-commit" "s2-print-cluster" permutation "s2-add-fkey" "s3-acquire-advisory-lock" "s1-insert-referenced" "s1-insert-referencing" "s2-begin" "s2-move-placement-nonblocking" "s1-ddl" "s3-release-advisory-lock" "s2-commit" "s2-print-cluster"
permutation "s2-add-fkey" "s3-acquire-advisory-lock" "s1-insert-referenced" "s2-begin" "s2-move-placement-nonblocking" "s1-insert-referencing" "s3-release-advisory-lock" "s2-commit" "s2-print-cluster" permutation "s2-add-fkey" "s3-acquire-advisory-lock" "s1-insert-referenced" "s2-begin" "s2-move-placement-nonblocking" "s1-insert-referencing" "s3-release-advisory-lock" "s2-commit" "s2-print-cluster"

View File

@ -137,4 +137,3 @@ permutation "s1-no-connection-cache" "s2-no-connection-cache" "s1-grant" "s1-beg
permutation "s1-no-connection-cache" "s2-no-connection-cache" "s1-begin" "s2-begin" "s2-truncate" "s1-insert" "s2-commit" "s1-commit" permutation "s1-no-connection-cache" "s2-no-connection-cache" "s1-begin" "s2-begin" "s2-truncate" "s1-insert" "s2-commit" "s1-commit"
permutation "s1-no-connection-cache" "s2-no-connection-cache" "s1-grant" "s1-begin" "s2-begin" "s1-truncate" "s2-insert" "s1-insert" "s1-commit" "s2-commit" permutation "s1-no-connection-cache" "s2-no-connection-cache" "s1-grant" "s1-begin" "s2-begin" "s1-truncate" "s2-insert" "s1-insert" "s1-commit" "s2-commit"
permutation "s1-no-connection-cache" "s2-no-connection-cache" "s1-grant" "s1-begin" "s2-begin" "s1-truncate" "s2-truncate" "s1-commit" "s2-commit" permutation "s1-no-connection-cache" "s2-no-connection-cache" "s1-grant" "s1-begin" "s2-begin" "s1-truncate" "s2-truncate" "s1-commit" "s2-commit"

View File

@ -81,13 +81,14 @@ step "s2-ddl-rename-column" { ALTER TABLE range_copy RENAME data TO new_column;
step "s2-table-size" { SELECT citus_total_relation_size('range_copy'); } step "s2-table-size" { SELECT citus_total_relation_size('range_copy'); }
step "s2-master-modify-multiple-shards" { DELETE FROM range_copy; } step "s2-master-modify-multiple-shards" { DELETE FROM range_copy; }
step "s2-master-drop-all-shards" { SELECT citus_drop_all_shards('range_copy'::regclass, 'public', 'range_copy'); } step "s2-master-drop-all-shards" { SELECT citus_drop_all_shards('range_copy'::regclass, 'public', 'range_copy'); }
step "s2-distribute-table" { step "s2-distribute-table"
{
SET citus.shard_replication_factor TO 1; SET citus.shard_replication_factor TO 1;
SET citus.next_shard_id TO 3004005; SET citus.next_shard_id TO 3004005;
SELECT create_distributed_table('range_copy', 'id', 'range'); SELECT create_distributed_table('range_copy', 'id', 'range');
UPDATE pg_dist_shard SET shardminvalue = '0', shardmaxvalue = '4' WHERE shardid = 3004005; UPDATE pg_dist_shard SET shardminvalue = '0', shardmaxvalue = '4' WHERE shardid = 3004005;
UPDATE pg_dist_shard SET shardminvalue = '5', shardmaxvalue = '9' WHERE shardid = 3004006; UPDATE pg_dist_shard SET shardminvalue = '5', shardmaxvalue = '9' WHERE shardid = 3004006;
} }
// We use this as a way to wait for s2-ddl-create-index-concurrently to // We use this as a way to wait for s2-ddl-create-index-concurrently to
// complete. We know it can complete after s1-commit has succeeded, this way we // complete. We know it can complete after s1-commit has succeeded, this way we
// make sure no other query is run over session s1 before that happens. // make sure no other query is run over session s1 before that happens.

View File

@ -25,10 +25,10 @@ setup
LANGUAGE C STRICT VOLATILE LANGUAGE C STRICT VOLATILE
AS 'citus', $$stop_session_level_connection_to_node$$; AS 'citus', $$stop_session_level_connection_to_node$$;
CREATE OR REPLACE PROCEDURE isolation_cleanup_orphaned_resources() CREATE OR REPLACE PROCEDURE isolation_cleanup_orphaned_resources()
LANGUAGE C LANGUAGE C
AS 'citus', $$isolation_cleanup_orphaned_resources$$; AS 'citus', $$isolation_cleanup_orphaned_resources$$;
COMMENT ON PROCEDURE isolation_cleanup_orphaned_resources() COMMENT ON PROCEDURE isolation_cleanup_orphaned_resources()
IS 'cleanup orphaned shards'; IS 'cleanup orphaned shards';
RESET citus.enable_metadata_sync; RESET citus.enable_metadata_sync;

View File

@ -67,4 +67,3 @@ step "s2-commit"
// session 1 updates node 1, session 2 writes should be blocked // session 1 updates node 1, session 2 writes should be blocked
permutation "s1-begin" "s1-update-node-1" "s2-begin" "s2-insert" "s1-commit" "s2-abort" permutation "s1-begin" "s1-update-node-1" "s2-begin" "s2-insert" "s1-commit" "s2-abort"
permutation "s2-begin" "s2-insert" "s1-update-node-1" "s2-commit" permutation "s2-begin" "s2-insert" "s1-update-node-1" "s2-commit"

View File

@ -63,4 +63,3 @@ step "s3-increase-pool-size"
} }
permutation "s3-lower-pool-size" "s1-begin" "s1-count-slow" "s3-increase-pool-size" "s2-select" "s1-commit" permutation "s3-lower-pool-size" "s1-begin" "s1-count-slow" "s3-increase-pool-size" "s2-select" "s1-commit"

View File

@ -0,0 +1 @@