From 5d8e0304e80daa67ed569a37dcbee5d0e299a4f7 Mon Sep 17 00:00:00 2001 From: Daniel Tabacaru Date: Thu, 25 May 2023 11:02:12 +0200 Subject: [PATCH] Fixes --- src/realm/object-store/sync/sync_manager.cpp | 2 +- src/realm/object-store/sync/sync_manager.hpp | 2 +- src/realm/sync/instruction_applier.cpp | 2 +- src/realm/sync/noinst/client_impl_base.hpp | 2 +- src/realm/sync/noinst/client_reset.cpp | 2 +- src/realm/sync/noinst/migration_store.cpp | 2 +- src/realm/sync/noinst/migration_store.hpp | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/realm/object-store/sync/sync_manager.cpp b/src/realm/object-store/sync/sync_manager.cpp index fef83d5d945..168b401c93f 100644 --- a/src/realm/object-store/sync/sync_manager.cpp +++ b/src/realm/object-store/sync/sync_manager.cpp @@ -192,7 +192,7 @@ bool SyncManager::run_file_action(SyncFileActionMetadata& md) // We successfully copied the Realm file to the recovery directory. bool did_remove = m_file_manager->remove_realm(original_name); // if the copy succeeded but not the delete, then running BackupThenDelete - // a second time would fail, so change this action to just delete the originall file. + // a second time would fail, so change this action to just delete the original file. if (did_remove) { return true; } diff --git a/src/realm/object-store/sync/sync_manager.hpp b/src/realm/object-store/sync/sync_manager.hpp index c00a6fb6e58..1f8a29f3f05 100644 --- a/src/realm/object-store/sync/sync_manager.hpp +++ b/src/realm/object-store/sync/sync_manager.hpp @@ -174,7 +174,7 @@ class SyncManager : public std::enable_shared_from_this { // makes it possible to guarantee that all sessions have, in fact, been closed. void wait_for_sessions_to_terminate() REQUIRES(!m_mutex); - // If the metadata manager is configured, perform an update. Returns `true` iff the code was run. + // If the metadata manager is configured, perform an update. Returns `true` if the code was run. bool perform_metadata_update(util::FunctionRef update_function) const REQUIRES(!m_file_system_mutex); diff --git a/src/realm/sync/instruction_applier.cpp b/src/realm/sync/instruction_applier.cpp index 0e0aa313b70..4ebb02f2e6f 100644 --- a/src/realm/sync/instruction_applier.cpp +++ b/src/realm/sync/instruction_applier.cpp @@ -1300,7 +1300,7 @@ InstructionApplier::PathResolver::Status InstructionApplier::PathResolver::resol return begin_status; } if (!obj) { - m_applier->bad_transaction_log("%1: No such object: %3 in class '%2'", m_instr_name, + m_applier->bad_transaction_log("%1: No such object: '%2' in class '%3'", m_instr_name, format_pk(m_applier->m_log->get_key(m_path_instr.object)), get_string(m_path_instr.table)); } diff --git a/src/realm/sync/noinst/client_impl_base.hpp b/src/realm/sync/noinst/client_impl_base.hpp index bc9780d73f9..37df91a5d5f 100644 --- a/src/realm/sync/noinst/client_impl_base.hpp +++ b/src/realm/sync/noinst/client_impl_base.hpp @@ -1017,7 +1017,7 @@ class ClientImpl::Session { // message. See struct SyncProgress for a description. The values stored in // `m_progress` either are persisted, or are about to be. // - // Initialized by way of ClientReplication::get_status() at session + // Initialized by way of ClientHistory::get_status() at session // activation time. // // `m_progress.upload.client_version` is the client-side sync version diff --git a/src/realm/sync/noinst/client_reset.cpp b/src/realm/sync/noinst/client_reset.cpp index 6d5fee9f280..04c57aa52d2 100644 --- a/src/realm/sync/noinst/client_reset.cpp +++ b/src/realm/sync/noinst/client_reset.cpp @@ -55,7 +55,7 @@ std::ostream& operator<<(std::ostream& os, const ClientResyncMode& mode) os << "Recover"; break; case ClientResyncMode::RecoverOrDiscard: - os << "RecoveOrDiscard"; + os << "RecoverOrDiscard"; break; } return os; diff --git a/src/realm/sync/noinst/migration_store.cpp b/src/realm/sync/noinst/migration_store.cpp index a4dd77ddb2a..b2300105c73 100644 --- a/src/realm/sync/noinst/migration_store.cpp +++ b/src/realm/sync/noinst/migration_store.cpp @@ -325,7 +325,7 @@ void MigrationStore::create_subscriptions(const SubscriptionStore& subs_store, c auto sub_count = mut_sub.size(); auto tr = m_db->start_read(); - // List of tables covered by latest subscription set. + // List of tables covered by the latest subscription set. auto tables = subs_store.get_tables_for_latest(*tr); // List of tables in the realm. diff --git a/src/realm/sync/noinst/migration_store.hpp b/src/realm/sync/noinst/migration_store.hpp index 2b5e17c48ca..7b976b8c7d8 100644 --- a/src/realm/sync/noinst/migration_store.hpp +++ b/src/realm/sync/noinst/migration_store.hpp @@ -77,12 +77,12 @@ class MigrationStore : public std::enable_shared_from_this { std::optional get_query_string(); // Create subscriptions for each table that does not have a subscription. - // If subscriptions are created, they are commited and a change of query is sent to the server. + // If new subscriptions are created, they are committed and a change of query is sent to the server. void create_subscriptions(const SubscriptionStore& subs_store); void create_subscriptions(const SubscriptionStore& subs_store, const std::string& rql_query_string); // Create a subscription set used as sentinel. No-op if not in 'Migrated' state. - // This method is idempotent (i.e, at most one subscription set can be createad during the lifetime of a + // This method is idempotent (i.e, at most one subscription set can be created during the lifetime of a // migration) void create_sentinel_subscription_set(const SubscriptionStore& subs_store); std::optional get_sentinel_subscription_set_version();