Skip to content
Snippets Groups Projects
Commit 46844bb7 authored by rswindell's avatar rswindell
Browse files

Add system.get_node() method to read a single node record in one shot:

use this in place of system.node_list[] if you're going to be using a lot of
the properties and passing them around to methods which are going to each
possibly dereference the values, as *each* deference results in a read of the
node record in the node.dab. On my system, a simple node list (e.g. /L
command) would result in between 60 and 100 reads of the node.dab (for a 13
node system), which was nuts.

The system.get_node() method currently leaves the node record unlocked and
there is currently no equivalent put_node() method, so you still need to use
the system.node_list[] for modification of node records. But, I now see there
are race conditions with the current methods of read-modify-writes of the
node_list[] properties. We should be locking a node.dab record, reading it,
modifying it, writing it, and then unlocking it - as is done in the C/C++
code. So... that's a todo item.

Also created system.stats.node_gets to track the number of node.dab reads
from a single instance of the system object. May remove this any time.
parent 681bcbb2
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment