wiredtiger/wiredtiger — pull request #846 by sueloverso (2014-01-15 21:26:06+00:00)
Title: Return if another thread already is in compact.

@agorrod please review this. In thinking about riak calling compact yesterday, I discovered that if multiple threads call compact on the same URI, all of them end up in the library a long time. If that is by design, then ignore this. But it seems that if one thread already gave merging the kickstart, the only thing this one is doing is hanging around and sleeping. However, the one thing I'm not sure of is returning 0 immediately as that may imply to the caller that all compacting is complete. But the use case I had in mind in riak was more "fire and forget" just to kick off merging.