Sage Weil [Wed, 10 Dec 2008 00:00:27 +0000 (16:00 -0800)]
osd: make sure hb peers get marked down
We mark_down on osdmap update when we see an osd has gone down, but the
heartbeats are sent in a different thread without map_lock using
heartbeat_inst. So, make sure heartbeat_inst entries are removed.
Also, we add hb peers at peers' request. When removing such entries in
update_heartbeat_peers, mark_down then, too. (We may mark_down a failed
peer, and then receive the hb request late. So we mark that down next
time we update the heartbeat maps.)
Sage Weil [Mon, 8 Dec 2008 21:50:46 +0000 (13:50 -0800)]
mds: stay loner if client has B and no other reason to switch state
If the client has dirty data, and there is no other reason to
toggle the lock state, leave it as LONER. The client will write
out at its leisure, and we'll avoid an unstable lock state that
is waiting on a potentially slow writeout.
Sage Weil [Mon, 8 Dec 2008 17:54:26 +0000 (09:54 -0800)]
osd: pause scrub wq async
The scrub _process() worker may be waiting on a message from a replica, so
we can't pause it synchronously. Instead, pause_new() to just prevent
new workers from starting.
Sage Weil [Fri, 5 Dec 2008 19:46:55 +0000 (11:46 -0800)]
osd: fix merge_log divergent item detection
An item in our log isn't divergent if it is below the bottom of
olog. Using the last_kept item isn't helpful here because
last_kept is in olog, and may be below that log's bottom.
Sage Weil [Fri, 5 Dec 2008 18:01:28 +0000 (10:01 -0800)]
osd: generate_backlog fixes
Generate backlog records even if the object appears in the log if
the existing entry's prior_version in non-zero and isn't also
in the log. This allows us to accurately generate the .have field
when we are building the missing map.
Sage Weil [Thu, 4 Dec 2008 21:46:19 +0000 (13:46 -0800)]
mon: keep pgmap consistent
We were cutting corners and updating the live map before it
committed to paxos, since pg stats aren't system critical. This
can lead to problems due to the way "latest" is saved out, though,
and it can be confusing to see things jump backward in time.
Sage Weil [Thu, 4 Dec 2008 19:17:58 +0000 (11:17 -0800)]
osd: drop lock during most of scrub; only disallow concurrent writes
Make the PG go read-only during a scrub. Only take the pg lock
when absolutely necessary. Wait for any pending writes to
complete before starting the scrub.
Sage Weil [Thu, 4 Dec 2008 03:46:08 +0000 (19:46 -0800)]
osd: keep projected info on in-progress object modifications in memory
Since the primary delays its writes until after replicas ack, we need to
keep projected object info in memory for the duration, because the
semantics very much depend on whether the object exists and what its size
is (well, mainly the pg_stats do).
This can avoid re-parsing SnapSet et al for certain workloads hitting
the same objects repeatedly (e.g., mds journal objects).
Sage Weil [Wed, 3 Dec 2008 21:55:48 +0000 (13:55 -0800)]
osd: fix small quirk read_log missing generation
The missing entry .have field was probably wrong due to the use
of missing.add_event (which assumes missing is up to date wrt
the previous log entry). Use the prior version we just pulled off
disk instead.
Sage Weil [Wed, 3 Dec 2008 21:41:12 +0000 (13:41 -0800)]
mon: always discard pending on election completion
Previously we tried to save the pending if we were still the
leader. The problem is that while we were not leader, we may have
missed out on some updates, in which case the pending may no longer
be based on the current state.
In the future, we could make the commit waiters smart about callback
return codes so that they try to reapply. For now, don't worry
about it.