basho / riak_cs

Riak CS is simple, available cloud storage built on Riak.
http://docs.basho.com/riakcs/latest/
Apache License 2.0
566 stars 95 forks source link

Access/Storage stats date range query issue [JIRA: RCS-362] #978

Closed lukebakken closed 1 year ago

lukebakken commented 10 years ago

This may or may not be a bug. See ticket 8795 for more details. Note in the following that the StartTime and EndTime are equal.

I did some tests querying the following storage stats:

{
    "Access": "not_requested",
    "Storage": {
        "Errors": [],
        "Samples": [
            {
                "EndTime": "20140925T090124Z",
                "StartTime": "20140925T090121Z",
                "test-bucket": {
                    "Bytes": 212356,
                    "Objects": 2
                }
            },
            {
                "EndTime": "20140924T090029Z",
                "StartTime": "20140924T090029Z",
                "test-bucket": {
                    "Bytes": 212356,
                    "Objects": 2
                }
            },
            {
                "EndTime": "20140923T090009Z",
                "StartTime": "20140923T090009Z",
                "test-bucket": {
                    "Bytes": 212356,
                    "Objects": 2
                }
            }
        ]
    }
}

As in your case, the following queries did not return stats:

$ ./s3curl.pl --id admin -- -s http://localhost:8080/riak-cs/usage/FNFBZABOAFMPI1FHI5QH/bj/20140924T090029Z/20140924T090029Z | python -m json.tool
{
    "Access": "not_requested",
    "Storage": {
        "Errors": [],
        "Samples": []
    }
}
$ ./s3curl.pl --id admin -- -s http://localhost:8080/riak-cs/usage/FNFBZABOAFMPI1FHI5QH/bj/20140924T090029Z/20140924T090030Z | python -m json.tool
{
    "Access": "not_requested",
    "Storage": {
        "Errors": [],
        "Samples": []

This one (with the time range increased by 1 second either way), did:

$ ./s3curl.pl --id admin -- -s http://localhost:8080/riak-cs/usage/FNFBZABOAFMPI1FHI5QH/bj/20140924T090028Z/20140924T090030Z | python -m json.tool
{
    "Access": "not_requested",
    "Storage": {
        "Errors": [],
        "Samples": [
            {
                "EndTime": "20140924T090029Z",
                "StartTime": "20140924T090029Z",
                "test-bucket": {
                    "Bytes": 212356,
                    "Objects": 2
                }
            }
        ]
    }
}
shino commented 10 years ago

related https://github.com/basho/riak_cs/issues/766