mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 11:49:53 -05:00
Merged PR 1540011: [Add-node] More fixes for add-node scenarios
### Does this PR have any customer impact? Yes ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Bugfix ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) No ### Are you introducing any new config? If yes, do you have tests with and without them being set? ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) ### Description - Cluster Data was not replicated fully on add node (upgrades would fail) - Checks for index wasn't handled in add-node scenarios. (Create/Drop indexes would fail) - Get versions on the GW on MX of the added node reutrns NullRef - fix these. ---- #### AI description (iteration 1) #### PR Classification Bug fix for add-node scenarios. #### PR Summary This pull request addresses issues related to ensuring metadata tables are properly replicated during add-node operations. - `distributed_hooks.c`: Refactored `EnsureMetadataTableReplicatedCore` to return a boolean and added `ExecuteMetadataChecksForReferenceTables`. - `create_indexes_background.c`: Added checks to ensure metadata tables are replicated before starting index creation. - `cluster_operations.c`: Ensured `cluster_data` table is replicated on all nodes during cluster setup. - `api_hooks.c` and `api_hooks.h`: Modified `EnsureMetadataTableReplicated` to return a boolean indicating if replication occurred. - `ExtensionVersionExtensions.cs`: Added null checks for version strings before writing them.
This commit is contained in:
1 parent
d3a92030fa
commit
3b609ecd8f
6 files changed
+49
-14
No files matched your search
@@ -146,7 +146,7 @@ bool IsChangeStreamFeatureAvailableAndCompatible(void);
|
||||
/*
|
||||
* Ensure the given metadata catalog table is replicated.
|
||||
*/
|
||||
void EnsureMetadataTableReplicated(const char *tableName);
|
||||
bool EnsureMetadataTableReplicated(const char *tableName);
|
||||
|
||||
/*
|
||||
* The hook allows the extension to do any additional setup
|
||||
|
||||
@@ -156,7 +156,7 @@ extern GetDistributedApplicationName_HookType get_distributed_application_name_h
|
||||
typedef bool (*IsNtoReturnSupported_HookType)(void);
|
||||
extern IsNtoReturnSupported_HookType is_n_to_return_supported_hook;
|
||||
|
||||
typedef void (*EnsureMetadataTableReplicated_HookType)(const char *);
|
||||
typedef bool (*EnsureMetadataTableReplicated_HookType)(const char *);
|
||||
extern EnsureMetadataTableReplicated_HookType ensure_metadata_table_replicated_hook;
|
||||
|
||||
typedef void (*PostSetupCluster_HookType)(bool);
|
||||
|
||||
Reference in new issue
Block a user