Thread

Commits

  1. Rename variable for code clarity

  1. Small patch modifying variable name to reflect the logic involved

    Krishnakumar R <kksrcv001@gmail.com> — 2023-09-14T06:28:44Z

    Hi All,
    
    Please find a small patch to improve code readability by modifying
    variable name to reflect the logic involved - finding diff between end
    and start time of WAL sync.
    
    --
    Thanks and Regards,
    Krishnakumar (KK)
    [Microsoft]
    
  2. Re: Small patch modifying variable name to reflect the logic involved

    Daniel Gustafsson <daniel@yesql.se> — 2023-09-14T09:30:54Z

    > On 14 Sep 2023, at 08:28, Krishnakumar R <kksrcv001@gmail.com> wrote:
    
    > Please find a small patch to improve code readability by modifying
    > variable name to reflect the logic involved - finding diff between end
    > and start time of WAL sync.
    
    -	INSTR_TIME_ACCUM_DIFF(PendingWalStats.wal_sync_time, duration, start);
    +	INSTR_TIME_SET_CURRENT(end);
    +	INSTR_TIME_ACCUM_DIFF(PendingWalStats.wal_sync_time, end, start);
    
    Agreed, the duration is the result of the INSTR_TIME_ACCUM_DIFF calculation,
    not what's stored in the instr_time variable.
    
    --
    Daniel Gustafsson
    
    
    
    
    
  3. Re: Small patch modifying variable name to reflect the logic involved

    Daniel Gustafsson <daniel@yesql.se> — 2023-09-15T17:50:51Z

    > On 14 Sep 2023, at 11:30, Daniel Gustafsson <daniel@yesql.se> wrote:
    > 
    >> On 14 Sep 2023, at 08:28, Krishnakumar R <kksrcv001@gmail.com> wrote:
    > 
    >> Please find a small patch to improve code readability by modifying
    >> variable name to reflect the logic involved - finding diff between end
    >> and start time of WAL sync.
    > 
    > -	INSTR_TIME_ACCUM_DIFF(PendingWalStats.wal_sync_time, duration, start);
    > +	INSTR_TIME_SET_CURRENT(end);
    > +	INSTR_TIME_ACCUM_DIFF(PendingWalStats.wal_sync_time, end, start);
    > 
    > Agreed, the duration is the result of the INSTR_TIME_ACCUM_DIFF calculation,
    > not what's stored in the instr_time variable.
    
    And done, with a small fixup to handle another occurrence in the same file.
    
    --
    Daniel Gustafsson