Jump to content


Max journal sequence number?

journal maximum sequence rollover

  • Please log in to reply
7 replies to this topic

#1 Miles O'Neal

Miles O'Neal

    Advanced Member

  • Members
  • PipPipPip
  • 76 posts

Posted 16 August 2018 - 07:23 PM

What is the max journal sequence number before it rolls over? Thanks.
2017.1 on Linux if it matters.

#2 Miles O'Neal

Miles O'Neal

    Advanced Member

  • Members
  • PipPipPip
  • 76 posts

Posted 16 August 2018 - 07:52 PM

Wait. Is this the current master journal file size? Is there any way to get that via a p4 command (for a previous journal), or do we need to look at the acrhived journal?
Working on monitoring software.

#3 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 588 posts

Posted 16 August 2018 - 08:13 PM

I'd expect the max journal number to be some kind of MAXINT value (at least 2^31).  I've never seen it roll over.

The number is just an incrementing counter and has nothing to do with the file size.  As far as I know the file size of the journal isn't stored in the journal anywhere, but IIRC recent versions of the server do produce checksums of the generated checkpoint and journal files.

#4 dave.foglesong

dave.foglesong

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 17 August 2018 - 02:05 AM

In recent versions of Perforce, you can get the current journal (and the various logs) size with "p4 logstat" and old checkpoint/journal details (including size) with "p4 journals".

#5 Miles O'Neal

Miles O'Neal

    Advanced Member

  • Members
  • PipPipPip
  • 76 posts

Posted 12 September 2018 - 09:50 PM

We have a replica we use for backups. It halts during the backup process so that we get a known state (metadata and depot files) for a clean restore. It's down for a few hours every night during the quietest period we have. 200M to 240M isn't unusual for the journal counter difference when it starts back up. That's ~10% of 2^31. So it rolls over fairly frequently if it's within 32 bits.
But if it's just a count of the journal size, then there is no set number, and there may not be an easy way to compute the true difference when there is more than one journal involved.

#6 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 588 posts

Posted 12 September 2018 - 09:59 PM

I'm not sure I'm clear on which number you're talking about, but the "journal" counter should only auto-increment by 1 each time a new journal is taken.  If it's incrementing by millions, something else is incrementing it.

#7 Miles O'Neal

Miles O'Neal

    Advanced Member

  • Members
  • PipPipPip
  • 76 posts

Posted 17 September 2018 - 03:42 PM

The journal sequence number, as reported in "p4 pull -lj" on replicas.

#8 p4rfong

p4rfong

    Advanced Member

  • Staff Moderators
  • 267 posts

Posted Yesterday, 01:29 AM

The journal sequence number in "p4 pull -lj" is simply the number of bytes since the last journal.  This grows in size until the journal is truncated.  You can look at the journal on the replica to see its contents as an indication of what the replica journal contains to find out why it is growing as fast as it does.





Also tagged with one or more of these keywords: journal, maximum, sequence, rollover

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users