We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
apply_changes
1 parent 7fec395 commit da4d63eCopy full SHA for da4d63e
src/kv/apply_changes.h
@@ -59,15 +59,8 @@ namespace ccf::kv
59
60
for (auto it = changes.begin(); it != changes.end(); ++it)
61
{
62
- bool changeset_has_writes = it->second.changeset->has_writes();
63
- if (changeset_has_writes)
64
- {
65
- has_writes = true;
66
- }
67
- if (changeset_has_writes || track_read_versions)
68
69
- it->second.map->lock();
70
+ has_writes |= it->second.changeset->has_writes();
+ it->second.map->lock();
71
}
72
73
bool ok = true;
@@ -177,10 +170,7 @@ namespace ccf::kv
177
170
178
171
179
172
180
- if (it->second.changeset->has_writes() || track_read_versions)
181
182
- it->second.map->unlock();
183
173
+ it->second.map->unlock();
184
174
185
175
186
176
if (!ok)
0 commit comments