Author |
Message
|
gward123 |
Posted: Thu Jun 05, 2003 11:17 am Post subject: Secondary logs with Linear logging |
|
|
 Novice
Joined: 27 Mar 2003 Posts: 11 Location: Roseland, NJ
|
I was in a pensive mood today and thought about the purpose of secondary logs when you're running linear logging. I noticed my NT queue manager had a secondary log setting (2) even though I was running linear.
My assumption is that this setting is ignored. Any other folks agree? _________________ Gary J. Ward
Sr. Technical Consultant
ADP |
|
Back to top |
|
 |
bduncan |
Posted: Thu Jun 05, 2003 4:00 pm Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
Interesting question, and I didn't know the answer off hand so I did a little digging. I came up with something I wasn't expecting, in the System Administration Guide, Chapter 14:
Quote: |
Although secondary log files are defined for linear logging, they are not used in normal operation. If a situation arises when, probably due to long-lived transactions, it is not possible to free a file from the active pool because it might still be required for a restart, secondary files are formatted and added to the active log file pool.
If the number of secondary files available is used up, requests for most further operations requiring log activity will be refused with an MQRC_RESOURCE_PROBLEM return code being returned to the application.
|
_________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
gward123 |
Posted: Fri Jun 06, 2003 3:16 am Post subject: |
|
|
 Novice
Joined: 27 Mar 2003 Posts: 11 Location: Roseland, NJ
|
Brandon,
Good detective work, sir! I didn't come across that section of the doc.
If you read that quote, it almost sounds like the "situation that arises" only applies to circular logs. I don't think a long-running uncommitted UOW would ever cause a secondary log to be generated in linear logging since the "pool" concept applies to circular logs. The linear logs would just keep marching on...
Thus, the conclusion would be that secondary logs are ignored when running linear.
Would you agree with this?
Regards,
Gary _________________ Gary J. Ward
Sr. Technical Consultant
ADP |
|
Back to top |
|
 |
TonyD |
Posted: Wed Jun 11, 2003 5:07 pm Post subject: |
|
|
Knight
Joined: 15 May 2001 Posts: 540 Location: New Zealand
|
Quote: |
The linear logs would just keep marching on... |
...only up to the number of primary log files that were specified in qm.ini, then secondary log files will be allocated. |
|
Back to top |
|
 |
gward123 |
Posted: Thu Jun 12, 2003 4:20 am Post subject: |
|
|
 Novice
Joined: 27 Mar 2003 Posts: 11 Location: Roseland, NJ
|
Ummm... OK I 'm now confused again. I thought linear logs will continue to be created from S0000000.LOG to S9999999.LOG and then wrap around? It almost sounds like you're saying it will only get to S0000062.LOG and then what? I didn't think the primary logs setting affected anything other than how many log files are pre-allocated at queue manager creation time? Especially when running linear.... _________________ Gary J. Ward
Sr. Technical Consultant
ADP |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jun 12, 2003 8:39 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The number of primary log files specifies the number of ACTIVE primary log files.
When the current primary log file gets filled up with active transactions, a new primary log file gets created to hold new active transactions. However, if the current number of active log files is equal to the primary log file setting, then a new secondary log file is created to hold new active transactions.
When all the open transactions in a log file get committed or rolled back, the log file is no longer active. |
|
Back to top |
|
 |
gward123 |
Posted: Thu Jun 12, 2003 8:59 am Post subject: |
|
|
 Novice
Joined: 27 Mar 2003 Posts: 11 Location: Roseland, NJ
|
So how does ACTIVE relate to linear logging? I see how active logs relate to circular since you can't over-write a log that has a transaction in it that hasn't completed. But in linear you just keep adding logs on to infinity. Linear logs are no longer needed based on checkpoints and media images (you know, those AMQ messages that tell you what logs are needed). So I still don't see how the word "Active" relates to linear logging.... _________________ Gary J. Ward
Sr. Technical Consultant
ADP |
|
Back to top |
|
 |
bduncan |
Posted: Thu Jun 12, 2003 9:09 am Post subject: |
|
|
Padawan
Joined: 11 Apr 2001 Posts: 1554 Location: Silicon Valley
|
Yes, there is an infinite number of files in linear logging, but I believe only a subset of these can be in the "active pool" at any one time (thus accessible by the queue manager). Therefore, if the entire active pool consists of a single UOW and you attempt to add another message to it, the queue manager cannot bring another log file into the active pool (because this requires moving another one out of it). At this point, it will make use of secondary log files (since these are not counting towards the active pool size)... _________________ Brandon Duncan
IBM Certified MQSeries Specialist
MQSeries.net forum moderator |
|
Back to top |
|
 |
gward123 |
Posted: Thu Jun 12, 2003 9:45 am Post subject: |
|
|
 Novice
Joined: 27 Mar 2003 Posts: 11 Location: Roseland, NJ
|
OK... so then I conclude that you can have no more than 63 "active" logs at one time regardless if you're running linear or circular. There may be piles of logs in the filesystem (and infinite space), but only 63 can be recognized by the queue manager at one time. Interesting... thanks to all for your input!
Now I must stop thinking up these bizarre questions! _________________ Gary J. Ward
Sr. Technical Consultant
ADP |
|
Back to top |
|
 |
|