Conversation
…edStartTime parameter
…ything should be cleaned)
…es to entity metadata
…es what page size is convenient)
jviau
left a comment
There was a problem hiding this comment.
Have some warnings to address due to the struct to class change.
| /// even though the entity does not "logically" exist, in the sense that it has no application-defined state. | ||
| /// Stateless entities are usually transient. For example, they may be in the process of being created or deleted, or they may have been locked by a critical section. | ||
| /// </remarks> | ||
| public bool IncludeStateless { get; init; } |
There was a problem hiding this comment.
Having this in addition to IncludeState does not look the most user friendly. Maybe an enum to combine the two bools would work better?
There was a problem hiding this comment.
Not sure that I prefer an enum since the two are logically independent (all four combinations are possible), and one of them is going to be relevant for most queries (IncludeState) while the other is an obscure feature likely to never be touched by most users (IncludeStateless).
There was a problem hiding this comment.
I have renamed IncludeStateless to IncludeTransient as discussed.
| /// Gets a value indicating whether to release orphaned locks or not. Defaults to true. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// Locks are considered orphaned, and are released, and if the orchestration that holds them is not in state |
There was a problem hiding this comment.
| /// Locks are considered orphaned, and are released, and if the orchestration that holds them is not in state | |
| /// Locks are considered orphaned, and are released, if the orchestration that holds them is not in state |
| /// Request struct for <see cref="DurableEntityClient.CleanEntityStorageAsync"/>. | ||
| /// </summary> | ||
| public readonly record struct CleanEntityStorageRequest | ||
| public record CleanEntityStorageRequest |
There was a problem hiding this comment.
I am not a big fan of changing to a class here, but not sure what a good alternative would be.
There was a problem hiding this comment.
Right, I agree. I couldn't figure out how to get the defaults specified without turning it into a class.
There was a problem hiding this comment.
I suppose I could define the struct without defaults and then define a static member Default which gets used as the default for the call. Let me try that.
There was a problem hiding this comment.
I have added a static Default factory method as a way to specify the defaults and still keep this a struct.
| /// Gets the default request parameters. The default is meant to represent | ||
| /// "maximal" cleaning that is safe to call at all times. | ||
| /// </summary> | ||
| public static CleanEntityStorageRequest Default => new() |
There was a problem hiding this comment.
You could also add a parameterless constructor and set all the bool properties to true there. This doesn't change default - but just an idea for you to consider.
…-defaults # Conflicts: # src/Worker/Core/Shims/TaskEntityShim.cs
Several changes (they are separated by commits):