mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-11 17:02:25 +00:00
Fix typos, comments
This commit is contained in:
parent
2e3bdd662e
commit
8a48bb24ce
@ -88,7 +88,6 @@ void DatabasePostgreSQLReplica<Base>::startSynchronization()
|
||||
: (global_context.getSettingsRef().max_insert_block_size.value),
|
||||
global_context.getMacros()->expand(settings->postgresql_tables_list.value));
|
||||
|
||||
/// TODO: may be no need to always fetch
|
||||
std::unordered_set<std::string> tables_to_replicate = replication_handler->fetchRequiredTables(connection->conn());
|
||||
|
||||
for (const auto & table_name : tables_to_replicate)
|
||||
@ -179,7 +178,6 @@ void DatabasePostgreSQLReplica<Base>::createTable(const Context & context, const
|
||||
if (storage_set.find("ReplacingMergeTree") != storage_set.end())
|
||||
{
|
||||
Base::createTable(context, name, table, query);
|
||||
/// TODO: Update table cached tables list or not
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -191,7 +189,6 @@ void DatabasePostgreSQLReplica<Base>::createTable(const Context & context, const
|
||||
template<typename Base>
|
||||
void DatabasePostgreSQLReplica<Base>::dropTable(const Context & context, const String & name, bool no_delay)
|
||||
{
|
||||
/// TODO: If called from non sync thread, add dropped storage to skip list
|
||||
Base::dropTable(context, name, no_delay);
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
|
||||
/// TODO: There is ALTER PUBLICATION command to dynamically add and remove tables for replicating (the command is transactional).
|
||||
/// This can also be supported. (Probably, if in a replication stream comes a relation name, which does not currenly
|
||||
/// This can also be supported. (Probably, if in a replication stream comes a relation name, which does not currently
|
||||
/// exist in CH, it can be loaded from snapshot and handled the same way as some ddl by comparing lsn positions of wal,
|
||||
/// but there is the case that a known table has been just renamed, then the previous version might be just dropped by user).
|
||||
|
||||
@ -139,7 +139,7 @@ private:
|
||||
/// if relation definition has changed since the last relation definition message.
|
||||
std::unordered_map<Int32, SchemaData> schema_data;
|
||||
|
||||
/// skip_list contains relation ids for tables on which ddl was perfomed, which can break synchronization.
|
||||
/// skip_list contains relation ids for tables on which ddl was performed, which can break synchronization.
|
||||
/// This breaking changes are detected in replication stream in according replication message and table is added to skip list.
|
||||
/// After it is finished, a temporary replication slot is created with 'export snapshot' option, and start_lsn is returned.
|
||||
/// Skipped tables are reloaded from snapshot (nested tables are also updated). Afterwards, if a replication message is
|
||||
|
@ -420,9 +420,9 @@ std::unordered_map<Int32, String> PostgreSQLReplicationHandler::reloadFromSnapsh
|
||||
auto ntx = std::make_shared<pqxx::nontransaction>(*replication_connection->conn());
|
||||
std::string snapshot_name, start_lsn;
|
||||
createReplicationSlot(ntx, start_lsn, snapshot_name, true);
|
||||
ntx->commit();
|
||||
|
||||
/// This snapshot is valid up to the end of the transaction, which exported it.
|
||||
auto success_tables = loadFromSnapshot(snapshot_name, sync_storages);
|
||||
ntx->commit();
|
||||
|
||||
for (const auto & relation : relation_data)
|
||||
{
|
||||
|
@ -374,7 +374,6 @@ Pipe StoragePostgreSQLReplica::read(
|
||||
size_t max_block_size,
|
||||
unsigned num_streams)
|
||||
{
|
||||
/// TODO: are there other places where this lock is needed
|
||||
std::unique_lock lock(nested_mutex, std::defer_lock);
|
||||
|
||||
if (nested_loaded && lock.try_lock())
|
||||
|
Loading…
Reference in New Issue
Block a user