Project

General

Profile

Bug #14686

OSDMap: reset osd_primary_affinity shared_ptr when deepish_copy_from

Added by Xinze Chi over 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
-
Start date:
02/07/2016
Due date:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
infernalis,hammer
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

Base on current logic, OSDMonitor may call create_pending and
encode_pending twice for the some epoch.

In encode_pending:

tmp.deepish_copy_from(osdmap);
tmp.apply_incremental(pending_inc);

This Op would change the tmp osd_primary_affinity, but the osd_primary_affinity
is declared as ceph::shared_ptr, so this would change the osdmap too. When this
round encode_pending is proposed fail. We may call encode_pending again, but the
osdmap is changed last round, so the pending_inc would be wrong.


Related issues

Copied to Ceph - Backport #14719: infernalis: OSDMap: reset osd_primary_affinity shared_ptr when deepish_copy_from Rejected
Copied to Ceph - Backport #14720: hammer: OSDMap: reset osd_primary_affinity shared_ptr when deepish_copy_from Resolved

Associated revisions

Revision 990b437f (diff)
Added by Xinze Chi over 3 years ago

OSDMap: reset osd_primary_affinity shared_ptr when deepish_copy_from

Base on current logic, OSDMonitor may call create_pending and
encode_pending twice for the some epoch.

In encode_pending:

tmp.deepish_copy_from(osdmap);
tmp.apply_incremental(pending_inc);

This Op would change the tmp osd_primary_affinity, but the osd_primary_affinity
is declared as ceph::shared_ptr, so this would change the osdmap too. When this
round encode_pending is proposed fail. We may call encode_pending again, but the
osdmap is changed last round, so the pending_inc would be wrong.

Fixes: #14686
Signed-off-by: Xinze Chi <>

Revision d5ba063c (diff)
Added by Xinze Chi over 3 years ago

OSDMap: reset osd_primary_affinity shared_ptr when deepish_copy_from

Base on current logic, OSDMonitor may call create_pending and
encode_pending twice for the some epoch.

In encode_pending:

tmp.deepish_copy_from(osdmap);
tmp.apply_incremental(pending_inc);

This Op would change the tmp osd_primary_affinity, but the osd_primary_affinity
is declared as ceph::shared_ptr, so this would change the osdmap too. When this
round encode_pending is proposed fail. We may call encode_pending again, but the
osdmap is changed last round, so the pending_inc would be wrong.

Fixes: #14686
Signed-off-by: Xinze Chi <>
(cherry picked from commit 990b437f4e616a87f4f7438e51945d531170ca83)

History

#1 Updated by Kefu Chai over 3 years ago

  • Status changed from New to Need Review
  • Assignee set to Xinze Chi
  • Source changed from other to Community (dev)

#2 Updated by Sage Weil over 3 years ago

  • Priority changed from High to Urgent
  • Backport set to infernalis,hammer

#3 Updated by Sage Weil over 3 years ago

  • Status changed from Need Review to Pending Backport

#4 Updated by Loic Dachary over 3 years ago

  • Copied to Backport #14719: infernalis: OSDMap: reset osd_primary_affinity shared_ptr when deepish_copy_from added

#5 Updated by Loic Dachary over 3 years ago

  • Copied to Backport #14720: hammer: OSDMap: reset osd_primary_affinity shared_ptr when deepish_copy_from added

#6 Updated by Loic Dachary almost 3 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF