Kouhei Sutou
null+****@clear*****
Thu Nov 3 16:36:34 JST 2016
Kouhei Sutou 2016-11-03 16:36:34 +0900 (Thu, 03 Nov 2016) New Revision: b0faaa1c213cf3a958179faeceadf0856c19ed07 https://github.com/pgroonga/pgroonga/commit/b0faaa1c213cf3a958179faeceadf0856c19ed07 Message: wal: fix wrong applied position Modified files: src/pgrn_wal.c Modified: src/pgrn_wal.c (+3 -3) =================================================================== --- src/pgrn_wal.c 2016-11-03 16:36:09 +0900 (56b869f) +++ src/pgrn_wal.c 2016-11-03 16:36:34 +0900 (6a81c45) @@ -1370,10 +1370,8 @@ PGrnWALApplyConsume(PGrnWALApplyData *data) BlockNumber nBlocks; msgpack_unpacker unpacker; msgpack_unpacked unpacked; - size_t unpackerBaseOffset; msgpack_unpacker_init(&unpacker, PGRN_PAGE_DATA_SIZE); - unpackerBaseOffset = unpacker.off; msgpack_unpacked_init(&unpacked); startBlock = data->current.block; dataOffset = data->current.offset; @@ -1405,7 +1403,9 @@ PGrnWALApplyConsume(PGrnWALApplyData *data) OffsetNumber appliedOffset; PGrnWALApplyObject(data, &unpacked.data); - appliedOffset = dataOffset + unpacker.off - unpackerBaseOffset; + appliedOffset = + dataOffset + + dataSize - (unpacker.used - unpacker.off); PGrnIndexStatusSetWALAppliedPosition(data->index, i, appliedOffset); -------------- next part -------------- HTML����������������������������... ダウンロード