more_bits_t(ScatterLock *lock) :
dirty(false), flushing(false), scatter_wanted(false),
- item_updated(lock)
+ item_updated(lock), stale(false)
{}
- bool empty() {
+ bool empty() const {
return dirty == false &&
flushing == false &&
scatter_wanted == false &&
finish_flush();
}
+ bool is_stale() const {
+ return have_more() && _more->stale;
+ }
+
+ void set_stale() {
+ more()->stale = true;
+ }
+
+ void clear_stale() {
+ if (is_stale()) {
+ _more->stale = false;
+ try_clear_more();
+ }
+ }
+
void set_last_scatter(utime_t t) { more()->last_scatter = t; }
- utime_t get_last_scatter() { return more()->last_scatter; }
+ utime_t get_last_scatter() {
+ return more()->last_scatter;
+ }
void infer_state_from_strong_rejoin(int rstate, bool locktoo) {
if (rstate == LOCK_MIX ||