[Bugs] [Bug 1512691] PostgreSQL DB Restore: unexpected data beyond EOF

bugzilla at redhat.com bugzilla at redhat.com
Thu Aug 23 15:41:35 UTC 2018


https://bugzilla.redhat.com/show_bug.cgi?id=1512691



--- Comment #45 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: https://review.gluster.org/20872 committed in master by "Raghavendra G"
<rgowdapp at redhat.com> with a commit message- performance/write-behind: fix
fulfill and readdirp race

Current invalidation of stats in wb_readdirp_cbk is prone to races. As
the deleted comment explains,

<snip>
    We cannot guarantee integrity of entry->d_stat as there are cached
    writes. The stat is most likely stale as it doesn't account the cached
    writes. However, checking for non-empty liability list here is not a
    fool-proof solution as there can be races like,
      1. readdirp is successful on posix
      2. sync of cached write is successful on posix
      3. write-behind received sync response and removed the request from
         liability queue
      4. readdirp response is processed at write-behind.

    In the above scenario, stat for the file is sent back in readdirp
    response but it is stale.
</snip>

The fix is to mark readdirp sessions (tracked in this patch by
non-zero value of "readdirps" on parent inode) and if fulfill
completes when one or more readdirp sessions are in progress, mark the
inode so that wb_readdirp_cbk doesn't send iatts for that in inode in
readdirp response. Note that wb_readdirp_cbk already checks for
presence of a non-empty liability queue and invalidates iatt. Since
the only way a liability queue can shrink is by fulfilling requests in
liability queue, wb_fulfill_cbk indicates wb_readdirp_cbk that a
potential race could've happened b/w readdirp and fulfill.

Change-Id: I12d167bf450648baa64be1cbe1ca0fddf5379521
Signed-off-by: Raghavendra G <rgowdapp at redhat.com>
updates: bz#1512691

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=FTgfooN7Fc&a=cc_unsubscribe


More information about the Bugs mailing list