Hi David,
While testing the python bindings, I noticed that get_event always return host_id=0:
{'data': 4,
'event': 3,
'from_generation': 13,
'from_host_id': 3,
'generation': 22,
'host_id': 0}
If I'm not wrong, sanlock needs the host_id only when sending events, so this is
field is not used when sending events to listeners.
The generation field also seems unneeded, as sanlock filter evnets with wrong
generation, so you will never get an event with generation other then the current
generation - right?
Maybe we should change the api so:
When sending events:
host_id = recipient host id (to)
generation = recipient generation
When receiving events:
host_id = sender host id (from)
generation = sender generation
So we can eliminate the from_host_id and from_generation in get_event, simplifying
the api and eliminating some reads/writes.
I can eliminate the unneeded fields in the python bindings, but I prefer to return
the same data you get in the c api.
what do you think?
Nir