[
https://issues.apache.org/jira/browse/HDFS-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14249643#comment-14249643
]
Harsh J commented on HDFS-7501:
-------------------------------
Thanks Gautam, patch looks mostly good and many thanks for writing a test as
well! I think the test could be improved a bit further to be a
regression-catching one for future, by doing something like:
1. Run NNs, preferably with low checkpoint transactions limit threshold
2. Make enough transactions to make it ready for checkpoint
3. Invoke or wait for a checkpoint on SBN
4. Measure metric for an assertion of not < 0 (this assertion will/must fail
without the fix)
Many thanks again!
> TransactionsSinceLastCheckpoint can be negative on SBNs
> -------------------------------------------------------
>
> Key: HDFS-7501
> URL: https://issues.apache.org/jira/browse/HDFS-7501
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: namenode
> Affects Versions: 2.5.0
> Reporter: Harsh J
> Assignee: Gautam Gopalakrishnan
> Priority: Trivial
> Attachments: HDFS-7501.patch
>
>
> The metric TransactionsSinceLastCheckpoint is derived as FSEditLog.txid minus
> NNStorage.mostRecentCheckpointTxId.
> In Standby mode, the former does not increment beyond the loaded or
> last-when-active value, but the latter does change due to checkpoints done
> regularly in this mode. Thereby, the SBN will eventually end up showing
> negative values for TransactionsSinceLastCheckpoint.
> This is not an issue as the metric only makes sense to be monitored on the
> Active NameNode, but we should perhaps just show the value 0 by detecting if
> the NN is in SBN form, as allowing a negative number is confusing to view
> within a chart that tracks it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)