RedisWriter: use one checksum algo for everything

This commit is contained in:
Alexander A. Klimov 2018-06-05 15:30:31 +02:00 committed by Michael Friedrich
parent b32b81d957
commit dc73db01b8
1 changed files with 1 additions and 11 deletions

View File

@ -43,22 +43,12 @@ String RedisWriter::CalculateCheckSumString(const String& str)
String RedisWriter::CalculateCheckSumGroups(const Array::Ptr& groups)
{
String output;
/* Ensure that checksums happen in a defined order. */
Array::Ptr tmpGroups = groups->ShallowClone();
tmpGroups->Sort();
{
ObjectLock olock(tmpGroups);
for (const String& group : tmpGroups) {
output += SHA1(group);
}
}
return SHA1(output);
return SHA1(PackObject(tmpGroups));
}
String RedisWriter::CalculateCheckSumProperties(const ConfigObject::Ptr& object)