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

pgmq result over panic #129

Merged
merged 7 commits into from
Feb 17, 2023
Merged

pgmq result over panic #129

merged 7 commits into from
Feb 17, 2023

Conversation

ChuckHend
Copy link
Member

@ChuckHend ChuckHend commented Feb 17, 2023

  • Use Result instead of panic! when there are invalid input values.
  • check byte values instead of regex, which is a bit faster. 33ns vs 13ns on a decent size string. Added the benchmark to ./benches, and snipped below.

@yrashk

check bytes             time:   [13.480 ns 13.534 ns 13.592 ns]
                        change: [+1.5645% +2.0646% +2.5431%] (p = 0.00 < 0.05)
                        Performance has regressed.
Found 3 outliers among 100 measurements (3.00%)
  2 (2.00%) high mild
  1 (1.00%) high severe

check regex             time:   [33.798 ns 33.899 ns 34.010 ns]
                        change: [-0.0699% +0.3138% +0.7198%] (p = 0.11 > 0.05)
                        No change in performance detected.

@ChuckHend ChuckHend marked this pull request as ready for review February 17, 2023 18:42
@ChuckHend ChuckHend merged commit f44c0f9 into main Feb 17, 2023
@ChuckHend ChuckHend deleted the pgmq/parse branch February 17, 2023 20:35
sjmiller609 added a commit that referenced this pull request Dec 5, 2023
* saving WIP... does not build

* Added in full yaml of cluster

* code builds

* Set reconcile loop back how it was

* Move ingress reconciliation to the end

* Add self.cnpg_enabled()

* implement finding primary pod of CNPG

* fmt

* reconcile CNPG

* Tests will build

* fmt

* Bump up wait time on termination test

* remove dead code

* demo worked

* fix justfile

* add connector to just file

* tidy logs

* update code to switch exporter over to cnpg instance when enabled

* fmt

* add back in cluster topology to status

* Add empty struct

* add a test

* fix

* fmt

* Tidy justfile

* Handle extensions flipping (#125)

* Update operator.yaml

* Set resources in CNPG and add a test (#126)

* Adding basic create test clone for CNPG enabled

* Handle setting resources

* Install kube-prometheus-stack

* Merge instead of apply

* Update integration_tests.rs

* remove service account from test

* fmt

* Fix psql command for CNPG and add migration test (#127)

* delete comment

* add function for waiting for pod

* Add migration test

* Restart when watcher is done (#128)

* Restart when watcher is done

* fmt

* Only sleep if failure

* Actions error handling

* fix stop test

* Reduce default logging

* Increase min sleep time to decrease operator business

* Increase reliability of tests

fix query

Fix await

* Decrease log volume

* Update coredb-operator/src/extensions.rs

* TEM-1284 Add postgres parameter and shared preload libary configuration (#130)

* rebase

* changes

* clippy fixes

* initial work to add params from cdb config

* adding more debugging

* clean up debugging code, add better error handling in patch for cnpg

* fmt

* adding broken test

* adding more tests

* finish up pgparams test

* fix tests, fix clippy issues

* Handle dropping shared_preload_libraries (#129)

* cleanup clippy issues

* fixing test

* Remove restart

---------

Co-authored-by: Steven Miller <sjmiller609@gmail.com>

* Update .github/workflows/operator.yaml

---------

Co-authored-by: Nick Hudson <nick.hudson@gmail.com>
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.

2 participants