-
Notifications
You must be signed in to change notification settings - Fork 184
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
chore: improve throughput, remove deadlocks #949
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
637ec72
add otel to pub
abelanger5 84e7811
temporarily remove tenant id exchange
abelanger5 e044db6
fix: increase internal queue throughput
abelanger5 1b5ea96
fix: remove potential deadlocking
abelanger5 07e06b0
rollback hash factor multiplier
abelanger5 b35f306
fix: batch update issues
abelanger5 9a5b1f1
fix: rm unneeded locks
grutt f8ff98f
move disable tenant pubsub to an env var
abelanger5 2d164c8
Merge branch 'main' into belanger/rabbitmq-pub-throughput
abelanger5 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,6 +110,12 @@ type ConfigFileRuntime struct { | |
// FlushItemsThreshold is the number of items to hold in memory until flushing to the database | ||
FlushItemsThreshold int `mapstructure:"flushItemsThreshold" json:"flushItemsThreshold,omitempty" default:"100"` | ||
|
||
// How many buckets to hash into for parallelizing updates | ||
UpdateHashFactor int `mapstructure:"updateHashFactor" json:"updateHashFactor,omitempty" default:"100"` | ||
|
||
// How many concurrent updates to allow | ||
UpdateConcurrentFactor int `mapstructure:"updateConcurrentFactor" json:"updateConcurrentFactor,omitempty" default:"10"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. min 1? |
||
|
||
// Allow new tenants to be created | ||
AllowSignup bool `mapstructure:"allowSignup" json:"allowSignup,omitempty" default:"true"` | ||
|
||
|
@@ -121,6 +127,9 @@ type ConfigFileRuntime struct { | |
|
||
// Allow passwords to be changed | ||
AllowChangePassword bool `mapstructure:"allowChangePassword" json:"allowChangePassword,omitempty" default:"true"` | ||
|
||
// DisableTenantPubs controls whether tenant pubsub is disabled | ||
DisableTenantPubs bool `mapstructure:"disableTenantPubs" json:"disableTenantPubs,omitempty"` | ||
} | ||
|
||
type SecurityCheckConfigFile struct { | ||
|
@@ -409,6 +418,7 @@ func BindAllEnv(v *viper.Viper) { | |
_ = v.BindEnv("runtime.allowInvites", "SERVER_ALLOW_INVITES") | ||
_ = v.BindEnv("runtime.allowCreateTenant", "SERVER_ALLOW_CREATE_TENANT") | ||
_ = v.BindEnv("runtime.allowChangePassword", "SERVER_ALLOW_CHANGE_PASSWORD") | ||
_ = v.BindEnv("runtime.disableTenantPubs", "SERVER_DISABLE_TENANT_PUBS") | ||
|
||
// security check options | ||
_ = v.BindEnv("securityCheck.enabled", "SERVER_SECURITY_CHECK_ENABLED") | ||
|
@@ -493,6 +503,8 @@ func BindAllEnv(v *viper.Viper) { | |
_ = v.BindEnv("runtime.singleQueueLimit", "SERVER_SINGLE_QUEUE_LIMIT") | ||
_ = v.BindEnv("runtime.flushPeriodMilliseconds", "SERVER_FLUSH_PERIOD_MILLISECONDS") | ||
_ = v.BindEnv("runtime.flushItemsThreshold", "SERVER_FLUSH_ITEMS_THRESHOLD") | ||
_ = v.BindEnv("runtime.updateHashFactor", "SERVER_UPDATE_HASH_FACTOR") | ||
_ = v.BindEnv("runtime.updateConcurrentFactor", "SERVER_UPDATE_CONCURRENT_FACTOR") | ||
|
||
// tls options | ||
_ = v.BindEnv("tls.tlsStrategy", "SERVER_TLS_STRATEGY") | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
min 1?