Skip to content

Commit

Permalink
message: set high priority for peering
Browse files Browse the repository at this point in the history
want peering as fast as it can

Signed-off-by: yaoning <yaoning@unitedstack.com>
  • Loading branch information
yaoning committed May 7, 2016
1 parent 985d3a5 commit ad9786b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
8 changes: 6 additions & 2 deletions src/messages/MOSDPGInfo.h
Expand Up @@ -31,10 +31,14 @@ class MOSDPGInfo : public Message {
epoch_t get_epoch() { return epoch; }

MOSDPGInfo()
: Message(MSG_OSD_PG_INFO, HEAD_VERSION, COMPAT_VERSION) {}
: Message(MSG_OSD_PG_INFO, HEAD_VERSION, COMPAT_VERSION) {
set_priority(CEPH_MSG_PRIO_HIGH);
}
MOSDPGInfo(version_t mv)
: Message(MSG_OSD_PG_INFO, HEAD_VERSION, COMPAT_VERSION),
epoch(mv) { }
epoch(mv) {
set_priority(CEPH_MSG_PRIO_HIGH);
}
private:
~MOSDPGInfo() {}

Expand Down
12 changes: 9 additions & 3 deletions src/messages/MOSDPGLog.h
Expand Up @@ -42,18 +42,24 @@ class MOSDPGLog : public Message {
spg_t get_pgid() { return spg_t(info.pgid.pgid, to); }
epoch_t get_query_epoch() { return query_epoch; }

MOSDPGLog() : Message(MSG_OSD_PG_LOG, HEAD_VERSION, COMPAT_VERSION) { }
MOSDPGLog() : Message(MSG_OSD_PG_LOG, HEAD_VERSION, COMPAT_VERSION) {
set_priority(CEPH_MSG_PRIO_HIGH);
}
MOSDPGLog(shard_id_t to, shard_id_t from, version_t mv, pg_info_t& i)
: Message(MSG_OSD_PG_LOG, HEAD_VERSION, COMPAT_VERSION),
epoch(mv), query_epoch(mv),
to(to), from(from),
info(i) { }
info(i) {
set_priority(CEPH_MSG_PRIO_HIGH);
}
MOSDPGLog(shard_id_t to, shard_id_t from,
version_t mv, pg_info_t& i, epoch_t query_epoch)
: Message(MSG_OSD_PG_LOG, HEAD_VERSION, COMPAT_VERSION),
epoch(mv), query_epoch(query_epoch),
to(to), from(from),
info(i) { }
info(i) {
set_priority(CEPH_MSG_PRIO_HIGH);
}

private:
~MOSDPGLog() {}
Expand Down
5 changes: 4 additions & 1 deletion src/messages/MOSDPGNotify.h
Expand Up @@ -40,11 +40,14 @@ class MOSDPGNotify : public Message {
vector<pair<pg_notify_t,pg_interval_map_t> >& get_pg_list() { return pg_list; }

MOSDPGNotify()
: Message(MSG_OSD_PG_NOTIFY, HEAD_VERSION, COMPAT_VERSION) { }
: Message(MSG_OSD_PG_NOTIFY, HEAD_VERSION, COMPAT_VERSION) {
set_priority(CEPH_MSG_PRIO_HIGH);
}
MOSDPGNotify(epoch_t e, vector<pair<pg_notify_t,pg_interval_map_t> >& l)
: Message(MSG_OSD_PG_NOTIFY, HEAD_VERSION, COMPAT_VERSION),
epoch(e) {
pg_list.swap(l);
set_priority(CEPH_MSG_PRIO_HIGH);
}
private:
~MOSDPGNotify() {}
Expand Down
5 changes: 4 additions & 1 deletion src/messages/MOSDPGQuery.h
Expand Up @@ -34,13 +34,16 @@ class MOSDPGQuery : public Message {

MOSDPGQuery() : Message(MSG_OSD_PG_QUERY,
HEAD_VERSION,
COMPAT_VERSION) {}
COMPAT_VERSION) {
set_priority(CEPH_MSG_PRIO_HIGH);
}
MOSDPGQuery(epoch_t e, map<spg_t,pg_query_t>& ls) :
Message(MSG_OSD_PG_QUERY,
HEAD_VERSION,
COMPAT_VERSION),
epoch(e) {
pg_list.swap(ls);
set_priority(CEPH_MSG_PRIO_HIGH);
}
private:
~MOSDPGQuery() {}
Expand Down

0 comments on commit ad9786b

Please sign in to comment.