> I meant all the changes go through NN.
It is currently going through NN. BTW, you may want to take a look the javadoc in LeaseManager. It describes how the generation stamps are updated.
> Note that a patch was attached but the fix is not described anywhere in the jira. Finally I read the patch.
The fix is described in the description and Dhruba's comment. If you need every detail of the fix, I think reading the patch is the best way. I am glad that you have already done so.
> Looking at the patch now, it looks like you do (correctly) consider it an error if reported gs is larger than stored gs.From the description of the jira, I thought NN might consider new reported gs as the correct one.
We are considering the case that the blocks are being written. Sorry that it is not clear.
> Btw, the patch just ignores such a block with a warning..., should it also delete such a block?
This case should not happen. If it happens, it indicates that there are bugs somewhere. Without knowing what is going on, it is better not delete the block.