Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osd: fix inaccurate counter and skip over queueing an empty transaction #7754

Merged
merged 14 commits into from Mar 18, 2016

Conversation

xiexingguo
Copy link
Member

This PR consists of two changes:

the first change tries to fix counter for batch transactions triggered to remove non-meta objects, this is problematic because that we may skip some meta objects which shall not be counted since they are not really queued. Besides, the counter itself is not very accurate, e.g., if we set osd_target_transaction_size to 30, we may actually queue 31 transactions to trigger a commit.

the second change tries to skip over an empty transaction(especially we have to wait for its finish), which is for the sake of performance.

@xiexingguo xiexingguo changed the title OSD: fix inaccurate counter and skip over queue an empty transaction OSD: fix inaccurate counter and skip over queueing an empty transaction Feb 23, 2016
@xiexingguo xiexingguo changed the title OSD: fix inaccurate counter and skip over queueing an empty transaction osd: fix inaccurate counter and skip over queueing an empty transaction Feb 25, 2016
@xiexingguo
Copy link
Member Author

@liewegas Mind having a look at this one? Thanks:)

@xiexingguo xiexingguo force-pushed the xxg-wip-14845 branch 2 times, most recently from e95f8eb to 9bc9d5f Compare March 12, 2016 03:02
The problem here is that we may skip some meta objects which shall not be
counted since they are not really queued. Besides, the counter itself is
not very accurate, e.g., if we set osd_target_transaction_size to 30, we
may actually queue 31 transactions to trigger a commit.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Make sure the file_object string will be bigger enough
(e.g., should be 16(for ino) + 1(for dot) + 16(for bno) +
1(for nul terminator) == 34 at maximum).
And update sprintf to snprintf correspondingly, which is
safer.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
which is never used by anyone.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
In one of our test environments an osd is unable to back to work
due to the journal is totally unrecoverable. The os_flags field
is introduced to handle such a case but never be made an option
and visible to normal user.

This commit tries to make os_flags field a configurable option and
no flags is enabled by default and thus shall cause no compatibility
relevant issues.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
… cmds

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
This is not necessary and does no good for performance.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@xiexingguo
Copy link
Member Author

@liewegas Append more fixes and ping.

@liewegas
Copy link
Member

Can you move the map sharing into a separate PR? I'm not sure those are a good idea, since it will make the receiving OSD pull those maps from the monitor. The rest looks good!

OSD_SUPERBLOCK_GOBJECT is a better name, I think.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@xiexingguo
Copy link
Member Author

@liewegas Done. Move those two changes into #8117

@liewegas liewegas added this to the jewel milestone Mar 15, 2016
liewegas added a commit that referenced this pull request Mar 18, 2016
osd: fix inaccurate counter and skip over queueing an empty transaction

Reviewed-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit ebf41cb into ceph:master Mar 18, 2016
@xiexingguo xiexingguo deleted the xxg-wip-14845 branch March 18, 2016 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants