From d8de8afc060c5cfc5ad847c0d488e5f3c3e851f8 Mon Sep 17 00:00:00 2001 From: Alexey Palazhchenko Date: Thu, 7 Dec 2023 20:20:56 +0400 Subject: [PATCH] Ignore `$clusterTime` (#3830) --- internal/handler/common/count.go | 1 + internal/handler/common/delete_params.go | 1 + internal/handler/common/distinct.go | 1 + internal/handler/common/find.go | 1 + internal/handler/common/findandmodify.go | 1 + internal/handler/common/insert.go | 1 + internal/handler/common/update_params.go | 1 + 7 files changed, 7 insertions(+) diff --git a/internal/handler/common/count.go b/internal/handler/common/count.go index 6e1f27afea21..e34bc50790f5 100644 --- a/internal/handler/common/count.go +++ b/internal/handler/common/count.go @@ -38,6 +38,7 @@ type CountParams struct { ReadConcern *types.Document `ferretdb:"readConcern,ignored"` Comment string `ferretdb:"comment,ignored"` LSID any `ferretdb:"lsid,ignored"` + ClusterTime any `ferretdb:"$clusterTime,ignored"` } // GetCountParams returns the parameters for the count command. diff --git a/internal/handler/common/delete_params.go b/internal/handler/common/delete_params.go index d19f2484479d..8bfa7d593c05 100644 --- a/internal/handler/common/delete_params.go +++ b/internal/handler/common/delete_params.go @@ -36,6 +36,7 @@ type DeleteParams struct { WriteConcern *types.Document `ferretdb:"writeConcern,ignored"` LSID any `ferretdb:"lsid,ignored"` + ClusterTime any `ferretdb:"$clusterTime,ignored"` } // Delete represents single delete operation parameters. diff --git a/internal/handler/common/distinct.go b/internal/handler/common/distinct.go index 02c8651fad46..79aeeb17cc02 100644 --- a/internal/handler/common/distinct.go +++ b/internal/handler/common/distinct.go @@ -44,6 +44,7 @@ type DistinctParams struct { ReadConcern *types.Document `ferretdb:"readConcern,ignored"` LSID any `ferretdb:"lsid,ignored"` + ClusterTime any `ferretdb:"$clusterTime,ignored"` } // GetDistinctParams returns `distinct` command parameters. diff --git a/internal/handler/common/find.go b/internal/handler/common/find.go index 13b1f16b00ab..d9e0498d0410 100644 --- a/internal/handler/common/find.go +++ b/internal/handler/common/find.go @@ -51,6 +51,7 @@ type FindParams struct { Min *types.Document `ferretdb:"min,ignored"` Hint any `ferretdb:"hint,ignored"` LSID any `ferretdb:"lsid,ignored"` + ClusterTime any `ferretdb:"$clusterTime,ignored"` ReturnKey bool `ferretdb:"returnKey,unimplemented-non-default"` ShowRecordId bool `ferretdb:"showRecordId,opt"` diff --git a/internal/handler/common/findandmodify.go b/internal/handler/common/findandmodify.go index e96b1a4cd399..61b6624b4d3d 100644 --- a/internal/handler/common/findandmodify.go +++ b/internal/handler/common/findandmodify.go @@ -68,6 +68,7 @@ type FindAndModifyParams struct { WriteConcern *types.Document `ferretdb:"writeConcern,ignored"` BypassDocumentValidation bool `ferretdb:"bypassDocumentValidation,ignored"` LSID any `ferretdb:"lsid,ignored"` + ClusterTime any `ferretdb:"$clusterTime,ignored"` } // UpsertParams represents parameters for upsert, if the document exists UpdateParams is set. diff --git a/internal/handler/common/insert.go b/internal/handler/common/insert.go index e8faed0266b1..e822ccb10037 100644 --- a/internal/handler/common/insert.go +++ b/internal/handler/common/insert.go @@ -36,6 +36,7 @@ type InsertParams struct { BypassDocumentValidation bool `ferretdb:"bypassDocumentValidation,ignored"` Comment string `ferretdb:"comment,ignored"` LSID any `ferretdb:"lsid,ignored"` + ClusterTime any `ferretdb:"$clusterTime,ignored"` } // GetInsertParams returns the parameters for an insert command. diff --git a/internal/handler/common/update_params.go b/internal/handler/common/update_params.go index 412a41942450..fc3f27975b37 100644 --- a/internal/handler/common/update_params.go +++ b/internal/handler/common/update_params.go @@ -38,6 +38,7 @@ type UpdateParams struct { BypassDocumentValidation bool `ferretdb:"bypassDocumentValidation,ignored"` WriteConcern *types.Document `ferretdb:"writeConcern,ignored"` LSID any `ferretdb:"lsid,ignored"` + ClusterTime any `ferretdb:"$clusterTime,ignored"` } // Update represents a single update operation parameters.