cloudant / bigcouch

Putting the 'C' back in CouchDB
http://bigcouch.cloudant.com/
Apache License 2.0
565 stars 52 forks source link

bad format for last_seq in _changes feed #61

Open benoitc opened 13 years ago

benoitc commented 13 years ago

I get an error using last_seq parameter of the _changes feed. I've following feed (last lines) :

{"seq":[105,"g1AAAAE7eJzLYWBg4MhgTmHgS0ktM3YwNDLXMwBCwxygOFMiQ5L8____sxJ5cKlIUgCSSfZgRbw4FTmAFMWDFQngVJQAUlQPVsSNS1EeC5BkaABSQHXz8bgLonABROH-rERO_AoPQBTez0rkx6_wAUQh0I2CWQD471Ov"],"id":"692b51b3ec3f7dee1b7a725bc518ea94","changes":[{"rev":"1-1d1b886e11dd25a6f66f92ec69b418ff"}]},
{"seq":[106,"g1AAAAE7eJzLYWBg4MhgTmHgS0ktM3YwNDLXMwBCwxygOFMiQ5L8____sxJ5cKlIUgCSSfZgRbw4FTmAFMWDFQniVJQAUlQPVsSNS1EeC5BkaABSQHXz8bgLonABROH-rERO_AoPQBTez0rkx6_wAUQhyCNZAPm6U7A"],"id":"692b51b3ec3f7dee1b7a725bc518dc11","changes":[{"rev":"1-d3dc43f2689018a8970f67b40a45fa22"}]},
{"seq":[107,"g1AAAAE7eJzLYWBg4MhgTmHgS0ktM3YwNDLXMwBCwxygOFMiQ5L8____sxJ5cKlIUgCSSfZgRbw4FTmAFMWDFQnhVJQAUlQPVsSNS1EeC5BkaABSQHXz8bgLonABROH-rERO_AoPQBTez0rkx6_wAUQh0I2CWQD6hVOx"],"id":"692b51b3ec3f7dee1b7a725bc518ab8b","changes":[{"rev":"1-8cf1f8a66e2635038116700f3963f5f2"}]}
],
"last_seq":"kg1AAAAE7eJzLYWBg4MhgTmHgS0ktM3YwNDLXMwBCwxygOFMiQ5L8____sxJ5cKlIUgCSSfZgRbw4FTmAFMWDFQnhVJQAUlQPVsSNS1EeC5BkaABSQHXz8bgLonABROH-rERO_AoPQBTez0rkx6_wAUQh0I2CWQD6hVOx"}

Using last_seq:

http://127.0.0.1:5984/testdb/_changes?since=kg1AAAAE7eJzLYWBg4MhgTmHgS0ktM3YwNDLXMwBCwxygOFMiQ5L8____sxJ5cKlIUgCSSfZgRbw4FTmAFMWDFQnhVJQAUlQPVsSNS1EeC5BkaABSQHXz8bgLonABROH-rERO_AoPQBTez0rkx6_wAUQh0I2CWQD6hVOx

{"error":"function_clause","reason":null,"stack":["chttpd_db:changes_callback/2","chttpd:handle_request/1","mochiweb_http:headers/5","proc_lib:init_p_do_apply/3"]} 

(full trace : http://friendpaste.com/7WFuFpTY9K4TavoBAaTww0)

Using previous seq:

http://127.0.0.1:5984/testdb/_changes?since=[107,%22g1AAAAE7eJzLYWBg4MhgTmHgS0ktM3YwNDLXMwBCwxygOFMiQ5L8____sxJ5cKlIUgCSSfZgRbw4FTmAFMWDFQnhVJQAUlQPVsSNS1EeC5BkaABSQHXz8bgLonABROH-rERO_AoPQBTez0rkx6_wAUQh0I2CWQD6hVOx%22]

Got:

{"results":[

],
"last_seq":"kg1AAAAE7eJzLYWBg4MhgTmHgS0ktM3YwNDLXMwBCwxygOFMiQ5L8____sxJ5cKlIUgCSSfZgRbw4FTmAFMWDFQnhVJQAUlQPVsSNS1EeC5BkaABSQHXz8bgLonABROH-rERO_AoPQBTez0rkx6_wAUQh0I2CWQD6hVOx"}

http://127.0.0.1:5984/testdb/_changes?since=[106,%22g1AAAAE7eJzLYWBg4MhgTmHgS0ktM3YwNDLXMwBCwxygOFMiQ5L8____sxJ5cKlIUgCSSfZgRbw4FTmAFMWDFQniVJQAUlQPVsSNS1EeC5BkaABSQHXz8bgLonABROH-rERO_AoPQBTez0rkx6_wAUQhyCNZAPm6U7A%22]

{"results":[
{"seq":[107,"g1AAAAE7eJzLYWBg4MhgTmHgS0ktM3YwNDLXMwBCwxygOFMiQ5L8____sxJ5cKlIUgCSSfZgRbw4FTmAFMWDFQnhVJQAUlQPVsSNS1EeC5BkaABSQHXz8bgLonABROH-rERO_AoPQBTez0rkx6_wAUQh0I2CWQD6hVOx"],"id":"692b51b3ec3f7dee1b7a725bc518ab8b","changes":[{"rev":"1-8cf1f8a66e2635038116700f3963f5f2"}]}
],
"last_seq":"kg1AAAAE7eJzLY
bdionne commented 13 years ago

Thanks @benoitc, I'll take a look, I recall fixing something here recently

bdionne commented 13 years ago

@benoitc, I forgot to mention, I think the last push to chttpd should have fixed this. Let us know otherwise

benoitc commented 13 years ago

@bdionne Thanks. Though I had still soem problems with latest verisons. https://github.com/cloudant/fabric/pull/13 & https://github.com/cloudant/chttpd/pull/8 are fixing this issue for me.