[Tarantool-patches] [PATCH v2 1/2] wal: fix tx boundaries
Serge Petrenko
sergepetrenko at tarantool.org
Fri May 29 14:09:14 MSK 2020
29.05.2020 01:53, Vladislav Shpilevoy пишет:
> Thanks for the patch!
>
>> diff --git a/src/box/wal.c b/src/box/wal.c
>> index b979244e3..ef4d84920 100644
>> --- a/src/box/wal.c
>> +++ b/src/box/wal.c
>> @@ -956,25 +956,37 @@ wal_assign_lsn(struct vclock *vclock_diff, struct vclock *base,
>> struct xrow_header **end)
>> {
>> int64_t tsn = 0;
>> + struct xrow_header **start = row;
>> + struct xrow_header **first_glob_row = row;
>> /** Assign LSN to all local rows. */
>> for ( ; row < end; row++) {
>> if ((*row)->replica_id == 0) {
>> /*
>> * All rows representing local space data
>> - * manipulations are signed wth a zero
>> + * manipulations are signed with a zero
>> * instance id. This is also true for
>> * anonymous replicas, since they are
>> * only capable of writing to local and
>> * temporary spaces.
>> */
>> - if ((*row)->group_id != GROUP_LOCAL)
>> + if ((*row)->group_id != GROUP_LOCAL) {
>> (*row)->replica_id = instance_id;
>> + }
> Seems like accidental diff.
Thanks! Fixed.
diff --git a/src/box/wal.c b/src/box/wal.c
index ef4d84920..59587510a 100644
--- a/src/box/wal.c
+++ b/src/box/wal.c
@@ -969,9 +969,8 @@ wal_assign_lsn(struct vclock *vclock_diff, struct
vclock *base,
* only capable of writing to local and
* temporary spaces.
*/
- if ((*row)->group_id != GROUP_LOCAL) {
+ if ((*row)->group_id != GROUP_LOCAL)
(*row)->replica_id = instance_id;
- }
(*row)->lsn = vclock_inc(vclock_diff,
(*row)->replica_id) +
vclock_get(base, (*row)->replica_id);
--
Serge Petrenko
More information about the Tarantool-patches
mailing list