Implement Service Manager API to set replica mode (#52)#53
Merged
Conversation
asfernandes
requested changes
Jun 5, 2026
asfernandes
reviewed
Jun 5, 2026
…ions, configure to execute, and add default assert(false) cases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
• Defined the ServiceManager.h enum class inside ServiceManager.h representing the three standard replication states: NONE , READ_ONLY , and READ_WRITE .
• Added ConfigManager.h and ConfigManager.h classes to support modifying database properties using isc_action_svc_properties .
• Implemented ConfigManager.cpp in ConfigManager.cpp to write the replica mode option ( isc_spb_prp_replica_mode ) to the service request parameter block.
• Used insertBytes with a 1-byte value to correctly satisfy the clumplet size constraints of Firebird's replication properties API.
• Added getters, setters, and replicaMode field to BackupManager.h in BackupManager.h.
• Updated database restoration logic in BackupManager.cpp to write isc_spb_res_replica_mode as a 1-byte value during database restore operations.
• Included the new ConfigManager.h header in the main library header fb-cpp.h.
• Wrote unit tests in ConfigManager.cpp verifying both replica mode configuration and database restoration replica states. The tests confirm the target mode by querying the MON$REPLICA_MODE table and system context variables.
• Built and ran the test suite, with all 282 tests passing successfully.