You can just add a "not" flag to the two functions :)

Thanks,
        Lucho

On Dec 8, 2008, at 2:03 PM, Abhishek Kulkarni wrote:

That is why I originally thought of having a bool represent the state, and preferably a string "reason" being more descriptive about the state.

If not xp_nodeset_filter_by_state(), can the xp_nodeset_list_by_state() have a boolean state parameter? There's no straight way to find which nodes are down and considering that bjs has to periodically poll for down nodes to detect cluster status changes, it is too much of a kludge to check for all the down states.

Sure, I can get the "up" nodes but then that calls for a function
xp_node_in_nodeset or xp_nodeset_difference

Just my 2 cents, Thanks.

On Mon, Dec 8, 2008 at 1:52 PM, Latchesar Ionkov <[EMAIL PROTECTED]> wrote:

I don't want to lose the fact that the node state can have any value not only "up" and "down", even though I am not sure what can we use it for.


On Dec 8, 2008, at 1:49 PM, Abhishek Kulkarni wrote:


If I want the down nodes, I can't call it with state == "down".
I have to filter all the "up" nodes and then take the difference between
the two sets

On Mon, 2008-12-08 at 13:41 -0700, Latchesar Ionkov wrote:
I don't understand what do we gain? Why don't you just call the old
functions with state == "up"?

Thanks,
       Lucho

On Dec 8, 2008, at 1:02 PM, Abhishek Kulkarni wrote:

This patch changes the semantics of the xp_nodeset_list_by state() and
xp_nodeset_filter_by_state() functions to :

Xpnodeset *xp_nodeset_list_by_state(char *server, int state);
int xp_nodeset_filter_by_state(Xpnodeset *, Xpnodeset *, int state);

Signed-off-by: Abhishek Kulkarni <[EMAIL PROTECTED]>

Note: the patch applies to both the branches, sxcpu & xcpu2.

THanks
<all.patch>





Reply via email to