Re: [Patch 1/1] tabled: Add replication daemon

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/26/2009 09:39 PM, Pete Zaitcev wrote:
This patch adds what amounts to a background process that maintains
redundancy for object data. It is far from the complete solution.
For one thing, it does not verify checksums. But it's a start.

There's no way to turn this off, by intention. The whole thing must
work very reliably, not steal too much from benchmarks (but if it
does, it's only honest to take the hit). It is indispensible.
However, there's a plan to add useful monitoring of jobs and other
state, such as available nodes.

This implementation uses a separate thread.

Signed-off-by: Pete Zaitcev<zaitcev@xxxxxxxxxx>

The only thing I am unclear on / worried about is the event_base stuff for libevent.

It seems to me you should

a) leave current main-thread libevent code unchanged

b) call event_base_new() for the new thread, passing that newly-created event_base to replica thread events using event_base_set().

event_reinit() seems more appropriate for forks than threads. tabled's needs are simple -- you simply need to create an additional event_base for the new thread.


Other comments (which may be irrelevant given the above):

+       /* Statics are a silly way to pass arguments to threads, but oh well. */
+       evbase = ev_base;
+
+       scan_thread = g_thread_create(rep_thread_func, NULL, FALSE, &error);

The second argument to g_thread_create() is a user-provided data pointer, passed directly to the newly created thread. No need for a static, AFAICS.

	Jeff


--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Fedora Clound]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux