Skip to content
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

Some random citus_dev improvements #352

Merged
merged 9 commits into from
Mar 15, 2024
Merged

Some random citus_dev improvements #352

merged 9 commits into from
Mar 15, 2024

Conversation

JelteF
Copy link
Contributor

@JelteF JelteF commented Feb 23, 2024

  • citus_dev: pass arguments directly to createNodeCommands
  • Don't fsync by default
  • Remove trailing whitespace
  • Add editorconfig
  • Add some basic gitignore stuff for citus_dev
  • Add --no-lib flag to not load citus shared library
  • Configure port in the config file instead of pg_ctl
  • Configure logging the config file instead of pg_ctl
  • remove nightlies for EOL distros

@JelteF JelteF requested a review from thanodnl February 23, 2024 15:27
@JelteF JelteF force-pushed the random-improvements branch 3 times, most recently from ef6e74d to 5e01b32 Compare February 27, 2024 17:00
Copy link
Member

@thanodnl thanodnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good, lets make sure before merging @gurkanindibay is ok with us removing old distributions. I don't know in what manner the tools repo is used for packaging/building/testing anymore.

Comment on lines 26 to 35
- el/7
- el/8
- ol/7
- debian/buster
- debian/bullseye
- debian/bookworm
- ubuntu/bionic
- ubuntu/focal
- ubuntu/jammy
- ubuntu/kinetic
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gurkanindibay could you double check these changes?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove ubuntu/kinetic however, we can not remove other ones. We still support el/7 and ol/7

Comment on lines 59 to 62
if arguments['--no-lib']:
shared_preload_libraries = ['pg_stat_statements']
else:
shared_preload_libraries = ['citus', 'pg_stat_statements']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for now, but it becomes more cumbersome if we need more preload libraries in the future.

Suggested change
if arguments['--no-lib']:
shared_preload_libraries = ['pg_stat_statements']
else:
shared_preload_libraries = ['citus', 'pg_stat_statements']
shared_preload_libraries = ['pg_stat_statements']
# double negation, what does it mean?
# we do add citus if we do _not_ provide the `--no-lib` flag
# because citus needs to be at the beginning of the list we perform this check last, and insert `citus` at index 0, which is the beginning of the list
if not arguments['--no-lib']:
shared_preload_libraries.insert(0, 'citus')

@@ -188,7 +201,7 @@ def main(arguments):
clustername = arguments["<name>"]
port = int(arguments["--port"])
for role in getRoles(clustername):
run(f'pg_ctl {pgctl_flags} start -D {clustername}/{role} -o "-p {port}" -l {role}_logfile')
run(f'pg_ctl {pgctl_flags} start -D {clustername}/{role} -o "-p {port}"')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can the port be removed if we have it in the config now?

possibly we would also need to remove the flag from start/restart, given it's a property of the cluster now, not a runtime argument.

@@ -2,7 +2,7 @@
"""citus_dev

Usage:
citus_dev make <name> [--size=<count>] [--port=<port>] [--use-ssl] [--no-extension] [--destroy] [--init-with=<sql_file>] [--init-worker-with=<sql_file>] [--with-pgbouncer]
citus_dev make <name> [--size=<count>] [--port=<port>] [--use-ssl] [--no-extension] [--no-lib] [--destroy] [--init-with=<sql_file>] [--init-worker-with=<sql_file>] [--with-pgbouncer] [--fsync]
citus_dev restart <name> [--watch] [--port=<port>]
citus_dev (start|stop) <name> [--port=<port>] [--force]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guess --port can be removed here

@JelteF JelteF force-pushed the random-improvements branch from 5e01b32 to 55e7f3a Compare March 15, 2024 13:32
@JelteF JelteF force-pushed the random-improvements branch from 55e7f3a to 9e927cf Compare March 15, 2024 13:34
@JelteF JelteF force-pushed the random-improvements branch from 9e927cf to e91bcb9 Compare March 15, 2024 13:35
@JelteF JelteF force-pushed the random-improvements branch from e91bcb9 to 6919d3f Compare March 15, 2024 14:17
@JelteF JelteF merged commit cc37d7d into develop Mar 15, 2024
41 of 43 checks passed
@JelteF JelteF deleted the random-improvements branch March 15, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants