T1B0 commented on code in PR #4493:
URL: https://github.com/apache/iggy/pull/4493#discussion_r4342266646
##########
foreign/go/contracts/client.go:
##########
@@ -66,6 +66,10 @@ type Client interface {
// Authentication is required.
DescribeOptions(ctx context.Context, scope OptionsScope) ([]OptionSpec,
error)
+ // Snapshot returns a ZIP archive of the requested server diagnostics.
+ // Authentication is required. All must be requested without other
types.
Review Comment:
"manage_server" is required by server to get snapshot - i think
"read_servers" alone is not enough
##########
foreign/go/contracts/snapshot_compression.go:
##########
@@ -15,18 +15,15 @@
// specific language governing permissions and limitations
// under the License.
-using System.Text.Json.Serialization;
+package iggcon
-namespace Apache.Iggy.Contracts;
+type SnapshotCompression uint8
-/// <summary>
-/// Immutable authority captured before a partition operation is sent. The
incarnation changes only when a
-/// partition id is reused after a delete, so offsets and retry receipts
never cross into the new partition.
-/// </summary>
-public readonly record struct PartitionContext(
- [property: JsonPropertyName("incarnation")] ulong Incarnation,
- [property: JsonPropertyName("owner_generation")] ulong OwnerGeneration,
- [property: JsonPropertyName("metadata_op")] ulong MetadataOp)
-{
- internal const int ENCODED_SIZE = 24;
-}
+const (
Review Comment:
if a caller writes "var c iggcon.SnapshotCompression" or leaves a struct
field unset, and sends compression 0 he would gets a server "InvalidCommand".
shouldn't the value 0 should be explicitly handled / errored / documented here ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]