-
unknown authored
changes to how synchronous checkpoint requests are executed. changes to how the background LRD flushing thread refrains from using all resources. See more comments for each file. storage/maria/checkpoint.c: I was not happy that checkpoint requests which want to know the success/error of their executed request, get inaccurate information in case of error (no error string etc). Instead of implementing a more complete communication protocol between requestor and executor, I make the requestor do the execution itself. I call this a synchronous checkpoint. For asynchronous checkpoints (requestor does not want to know success/error, does not want to wait for completion), no change, checkpoint is executed by the background thread. Comments, constants, mutex usage fixes. storage/maria/checkpoint.h: new prototype of "API" (the calls exposed by the checkpoint module) storage/maria/least_recently_dirtied.c: A better solution than sleeping one second after flushing a piece of the LRD: instead we pthread_yield(). Hopefully this will slow down the background thread (avoiding it using all the disk's bandwidth) if there are other threads competing, and will not slow it down if this thread is alone (where we do want it to run fast and not do useless sleeps). This thread will probe for asynchronous checkpoint requests every few seconds.
30e5a9bd