Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small documentation and code fixes #6672

Merged
merged 1 commit into from
May 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/realm/object-store/sync/sync_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/realm/object-store/sync/sync_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class SyncManager : public std::enable_shared_from_this<SyncManager> {
// 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<void(SyncMetadataManager&)> update_function) const
REQUIRES(!m_file_system_mutex);

Expand Down
2 changes: 1 addition & 1 deletion src/realm/sync/instruction_applier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
2 changes: 1 addition & 1 deletion src/realm/sync/noinst/client_impl_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/realm/sync/noinst/client_reset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/realm/sync/noinst/migration_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/realm/sync/noinst/migration_store.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ class MigrationStore : public std::enable_shared_from_this<MigrationStore> {
std::optional<std::string> 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<int64_t> get_sentinel_subscription_set_version();
Expand Down