This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
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.
Set dynamic config values and default search attribute cache as disabled #136
Set dynamic config values and default search attribute cache as disabled #136
Changes from 2 commits
9ea176b
195a1c2
c970b4a
ae63ff6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I'd love to ship "production ready" defaults as much as possible. Do we think that disabling this cache will be a limiting factor in terms of performance? Trading a small amount of runtime performance for no race conditions or startup wait time sounds fine to me, though we could also consider only enabling this in the
temporaltest
package if the runtime cost is high.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.
Also instead of setting a default here, I think we should probably do it inside
temporalite.NewServer
so that library users get the same behavior.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.
I originally had the same concerns but thought Temporalite was going for "development defaults" even in the CLI. I would be happy only setting this in
temporaltest
. Let me confirm with @bergundy who wanted this defauted in the CLI.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.
This makes me think that having the
temporalite "yolo"
command for common test setup (includes--ephemeral
too) is starting to make sense.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.
IMO Temporalite values go something like this
So I'm very happy to trade off some performance for a better development experience. We can always add a
--production
flag to swap around a few defaults and keep things simple.Another thought is that we could add flags to register search attributes at startup like we do for namespaces. This would essentially be the best of both worlds since we'd be able to ensure that each of those SAs is registered synchronously, without disabling caching completely.
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.
I'd rather users do this with the SDK so their tests can run against any server implementation without customization.
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.
Removed default from CLI
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.
Constraints sound nice... what are they and is there future work we should track to support them?
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.
I don't really know, I'd have to speak to the server team. My use case and most use cases I've seen don't have these constraints. We can block this PR for that if we really need to.
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.
Commented above, but should we make this the default and instead add an option for enabling the cache? We could comment to the effect of changing this default if/when we are able to remove the waiting period after registering search attributes, and if you need stable behavior use
WithDynamicConfigValue
.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.
I think it should be opt-in programmatically, like persistence-disabled, especially now that we are going to turn it off by default on the CLI. (will still use in
temporaltest
)