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: print pg_info_t::purged_snaps as array, not string #14217

Merged
merged 1 commit into from Apr 3, 2017

Conversation

Projects
None yet
2 participants
@Liuchang0812
Contributor

Liuchang0812 commented Mar 29, 2017

for (const auto&& i: purged_snaps) {
f->dump_stream("snap") << i;
}
f->close_section();

This comment has been minimized.

@liewegas

liewegas Mar 29, 2017

Member

purged_snaps is an interval set, which means it can compactly include a million snaps (1~1000000), and we don't want to dump them all. this probably needs to do an array of objects with "start" and "length" values.

This comment has been minimized.

@Liuchang0812

Liuchang0812 Mar 30, 2017

Contributor

Hi, @liewegas

how about

➜  build git:(wip-18584-pg-info-dump) ✗ ./bin/ceph-objectstore-tool --data-path=./dev/osd1/ --dry-run --op info --pgid 2.4
{
    "pgid": "2.4",
    "last_update": "13'8",
    "last_complete": "13'8",
    "log_tail": "0'0",
    "last_user_version": 8,
    "last_backfill": "MAX",
    "last_backfill_bitwise": 0,
    "purged_snaps": [
        {
            "start": "1",
            "length": "1"
        },  
        {
            "start": "3",
            "length": "1"
        }   
    ],  

This comment has been minimized.

@liewegas

liewegas Mar 30, 2017

Member

perfect!

osd: print pg_info_t::purged_snaps as array, not string
Fixes: http://tracker.ceph.com/issues/18584
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
@Liuchang0812

This comment has been minimized.

Contributor

Liuchang0812 commented Mar 31, 2017

Updated and pushed

@liewegas liewegas merged commit 7b7402f into ceph:master Apr 3, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment