none
Always-on : recovery_lsn vs commit_lsn RRS feed

  • Question

  • recovery_lsn : I found it has different sequence (or format ) with another lsn column
    recovery_lsn : 4294967295429496729500001   last_harden_lsn : 38000001549400001

    And what's the actually meaning of last_commit_time ??

    for sync-mode : the commit_time is always the same as primary replica >

    for async-mode: there may be difference ?

    Saturday, August 24, 2019 4:29 PM

All replies

  • anyone has the idea ?
    Sunday, August 25, 2019 3:34 PM
  • any one has the idea ?

    Monday, August 26, 2019 6:00 AM
  • Hi sakurai_db,
    >> what's the actually meaning of last_commit_time ?

    For the primary database, the last_commit_time is the time when the latest transaction has been committed. For the secondary database, the last_commit_time is the latest commit time for the transaction on the primary database that has been successfully hardened on the secondary database as well. This number should be the same for both the primary and secondary database. A gap between these two values is the duration in which pending transactions have not been hardened on the secondary database, and will be lost in the event of a failover.

    >> recovery_lsn : I found it has different sequence (or format ) with another lsn column

    If recovery_lsn is less than the current hardened LSN (last_hardened_lsn), recovery_lsn is the value to which this secondary database would need to resynchronize (that is, to revert to and reinitialize to). If this value is greater than or equal to the current hardened LSN, resynchronization would be unnecessary and would not occur.

    Please refer to Understanding the LSN Column Values

    Best regards,
    Cathy 

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, August 26, 2019 7:05 AM
  • So what's the difference between meaning harden_time and commit_time??????????

    can you show me how recovery_lsn  and hardened LSN  is compared ???????

    recovery_lsn 4294967295429496729500001  vs last_harden_lsn : 38000001549400001

    ??

    obviously

    Monday, August 26, 2019 8:37 AM
  • if you say "For the secondary database, the last_commit_time is the latest commit time for the transaction on the primary database that has been successfully hardened on the secondary database as well"

    so what's the difference between last_commit_time and last_harden_time??

    Monday, August 26, 2019 8:40 AM
  • if you say "For the secondary database, the last_commit_time is the latest commit time for the transaction on the primary database that has been successfully hardened on the secondary database as well"

    so what's the difference between last_commit_time and last_harden_time??

    Hi sakurai_db,

    Please refer to this MS official document to get more information. I also find a similar thread, hope it could help you.

    Best regards,
    Cathy 


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to  MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, August 27, 2019 7:25 AM
  • from the link it says:

    "The data first becomes committed and available for reading by queries (outside of strange NOLOCK situations) at

    last_commit_time"

    seems different explaination from Cathy J.

    Tuesday, August 27, 2019 3:12 PM
  •   Hi,

      I think we need choose the explanation from MS official document.

    Wednesday, August 28, 2019 7:24 AM