Skip to content

random: revert change from boost::optional to std::optional - #21567

Merged
cbodley merged 1 commit into
ceph:masterfrom
cbodley:wip-23778
Apr 21, 2018
Merged

cbodley merged 1 commit into
ceph:masterfrom
cbodley:wip-23778

Conversation

@cbodley

@cbodley cbodley commented Apr 20, 2018

Copy link
Copy Markdown
Contributor

somehow this was breaking the seeding of thread-local engines on gcc.
we'll have to investigate this further, but for now i'm reverting this
piece to get messengers working again

Fixes: http://tracker.ceph.com/issues/23778

@cbodley
cbodley requested review from chardan and tchaikov April 20, 2018 16:21
@cbodley cbodley added this to the mimic milestone Apr 20, 2018
@cbodley cbodley changed the title random: revert change from std::optional to boost::optional random: revert change from boost::optional to std::optional Apr 20, 2018
somehow this was breaking the seeding of thread-local engines on gcc.
we'll have to investigate this further, but for now i'm reverting this
piece to get messengers working again

Fixes: http://tracker.ceph.com/issues/23778

Signed-off-by: Casey Bodley <[email protected]>
@cbodley

cbodley commented Apr 20, 2018

Copy link
Copy Markdown
Contributor Author

@cbodley
cbodley merged commit 2e1b7f9 into ceph:master Apr 21, 2018
@cbodley
cbodley deleted the wip-23778 branch April 21, 2018 00:32

@chardan chardan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. Apologies for my overzealousness in moving from boost::optional-- I'll try to discover what semantics are different, it may have to do with what happens on default construction (though from the documentation, that would surprise me).

@cbodley

cbodley commented Apr 21, 2018

Copy link
Copy Markdown
Contributor Author

@chardan we've been using std::optional without any problems, so i'm not sure why it's acting up here. maybe some interaction with thread_local?

@chardan

chardan commented Apr 21, 2018

Copy link
Copy Markdown
Contributor

@cbodley That's my best guess right now-- still needs further investigation. TBH, as best as I can tell there shouldn't have been any issue, but reality didn't seem to match! It's possible that it's a compiler issue, but I don't have any evidence yet.

yuriw pushed a commit that referenced this pull request Apr 26, 2018
Snapshot deletion requests on snap ids larger than the snap_seq of
the pool will leave the pool in a state with snap_seq being less
than max(removed_snaps).

This is bad because further deletion requests to a pool in this state
might crash the mon in some cases: the deletion also inserts the new
snap_seq into the removed_snaps set -- which might already exist
in this case and trigger an assert.

Such bad requests will be generated by rbd clients without a fix for
issue #21567.

The change in OSDMonitor prevents pools from getting into this state
and may prevent old broken clients from incorrectly deleting snaps.
The change in osd_types avoids a crash if a pool is already in this
state.

Fixes #18746

Signed-off-by: Paul Emmerich <[email protected]>
emmericp pushed a commit to croit/ceph that referenced this pull request Apr 29, 2018
Snapshot deletion requests on snap ids larger than the snap_seq of
the pool will leave the pool in a state with snap_seq being less
than max(removed_snaps).

This is bad because further deletion requests to a pool in this state
might crash the mon in some cases: the deletion also inserts the new
snap_seq into the removed_snaps set -- which might already exist
in this case and trigger an assert.

Such bad requests will be generated by rbd clients without a fix for
issue ceph#21567.

The change in OSDMonitor prevents pools from getting into this state
and may prevent old broken clients from incorrectly deleting snaps.
The change in osd_types avoids a crash if a pool is already in this
state.

Fixes ceph#18746

Signed-off-by: Paul Emmerich <[email protected]>
(cherry picked from commit f42a6ba)

 Conflicts:
	src/osd/osd_types.cc
@cbodley cbodley mentioned this pull request Dec 9, 2024
4 of 14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants