Fix race in ColumnUnique.h (#54575)

This commit is contained in:
Nikita Taranov 2023-09-14 12:55:08 +02:00 committed by GitHub
parent a9ae813db0
commit bdb52eefc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -670,9 +670,8 @@ UInt128 ColumnUnique<ColumnType>::IncrementalHash::getHash(const ColumnType & co
for (size_t i = 0; i < column_size; ++i)
column.updateHashWithValue(i, sip_hash);
hash = sip_hash.get128();
std::lock_guard lock(mutex);
hash = sip_hash.get128();
cur_hash = hash;
num_added_rows.store(column_size);
}