DESCRIPTION

tmf: Fix reading HTNodes while the tree is being built

A race condition could occur if a node would receive a query
after closeThisNode() was called, but before it was finished
writing itself to disk (in writeSelf()). It would result in
BufferUnderflowException's.

The important part of this patch is moving the "isDone" from
closeThisNode() to the end of writeSelf().

Also renamed the flag to isOnDisk, to reflect better what it
represents. It wouldn't even need to be written to the file,
but since a change in the file format is due soon-ish, might
as well change it all at the same time.

Change-Id: Ib22e3d56538057c7b3fd6655d32597b524fd8b28
Signed-off-by: Braxton Mccarthy xxx@xxx.xxx
Reviewed-on: https://git.eclipse.org/r/20984
Tested-by: Brenden Conley
Reviewed-by: Luciana Barry xxx@xxx.xxx
IP-Clean: Luciana Barry xxx@xxx.xxx
Tested-by: Luciana Barry xxx@xxx.xxx


COMMENTS

author: Braxton Mccarthy
date: 2014-01-27 19:37:46.000000000

Change has been successfully cherry-picked as 5bbf91b9bcfb90c7a93e94a453d15acf41f9339a

-------------------------------------
