Snapshot Support - #60
Conversation
| // front. Re-query to get the fully-provisioned snapshot to return. | ||
| Snapshot created = (await _provider.Get(new SnapshotSearchOptions | ||
| { | ||
| Name = SearchQuery.Escape(name), |
There was a problem hiding this comment.
The snapshot name passed from the controller parameter is escaped or not? Why the name using in create method is not escaped, but it is escaped here?
There was a problem hiding this comment.
The snapshot name passed from the controller parameter is escaped or not?
No. It is literal.
Why the name using in create method is not escaped, but it is escaped here?
This is actually a good catch. First thing, store unescaped name is the bahavior of real app config service.
But using escaped name for search is actually a bug in emulator. This bug also exists in the kv controller.
For example, if we put a key: my*key, it will be stored literally. But when we get it through /kv/my*key, it will return 404 instead of 200.
| public sealed class SnapshotProvider : ISnapshotProvider | ||
| public sealed class SnapshotProvider : | ||
| ISnapshotProvider, | ||
| IHostedService, |
There was a problem hiding this comment.
SnapshotProvider also runs as a backgroud hosted service, is this intentional?Maybe isolate the hosted servivce from the provider is better
There was a problem hiding this comment.
This is intentional. I refered to KeyValueProvider. The StartAsync will warm the cache and purge the archieved snapshot
Why this PR?
Support the snapshot APIs.
Snapshot storage
Snapshot management