On Sat, Aug 10, 2013 at 11:49:16AM +0000, Qixiaozhen wrote:
In the code of delta lease, the host checks the leader_record with
offset by its hostid.
If the resource_name was the same with the current value of hostname, write the timestamp
directly.
Code lists here:
if (!strncmp(leader.resource_name, our_host_name, NAME_ID_SIZE)) { //the same
hostname
log_space(sp, "delta_acquire fast reacquire");
goto write_new;
}
However, the uuid was changed once the host was reboot or the daemon was restart. In this
case, the delta would waste 20s because of the difference with the uuids in the same
host.
Code lists here:
uuid_generate(uu);
uuid_unparse_lower(uu, uuid);
If the uuid that was invariant in the same host, and different in different hosts, 20s
would be saved.
The system uuid in the dmidecode is a better choice. What do you think about this?
Yes, I think it would be a good option to use the dmi uuid (I'd probably
keep the existing uuid and make dmi an option.) I'd be happy to apply
a patch for this.
(You should be able to do this right now with a command such as:
sanlock daemon -e `dmidecode -s system-uuid`)
Dave