quirkey / soca

Sammy On Couch App
MIT License
157 stars 26 forks source link

View server crash w/ quirkey/action #4

Open benatkin opened 14 years ago

benatkin commented 14 years ago

Hi! The first thing I did with soca was run off and install action on Cloudant. Viewing a filtered list didn't work, and the next day I got an email from Cloudant, saying that a newline was crashing their view server. The file referenced near the top was where it came from.

I realize that the mistake was in Action, but I don't think a mistake in an app should cause a crash in the view server. That's why I'm posting it here.

-----Original Message----- From: "Ben Atkin" ben@benatkin.com Reply-To: "Ben Atkin" ben@benatkin.com Date: Tue, 28 Sep 2010 08:09:05 -0600 To: "Cloudant Support" support@cloudant.com Subject: Re: (Case 10962) faulty builtin reduce function

Thanks! I wondered why it wasn't working. Here's where I got the code (pushed up verbatim):

http://github.com/quirkey/action/commit/b2517a774c2614c869e098a9d190bc3bc4fdbb8c

I wish github didn't use fuzzy dates so much. The date it changed was on Sunday, which is a bit more than one day ago.

The bug is likely in soca. It doesn't look like it's been fixed yet in either of them. I'm trying to track it down.

http://github.com/quirkey/soca/

Ben

On Tue, Sep 28, 2010 at 7:39 AM, Cloudant Support support@cloudant.comwrote:

Hi, we noticed some odd indexing behavior on your "action" database. It turns out that your "_count" reduce function was actually saved as "_count\n", which the system did not recognize. This caused crashes whenever the view was indexed. We corrected the reduce function and will bring up the issue of validating builtin reduce functions with the CouchDB team. Regards,

Adam Kocoloski - Cloudant Support

quirkey commented 14 years ago

Thats really strange - I'm using this exact code on my local and on a remote couchdb running 1.0.1 and both are running fine. I'm guessing this has something to do with cloudant's version of Couch. If its as simple as removing a newline though, it should be easy to fix.

benatkin commented 14 years ago

It worked for me on my local couch as well. Strange indeed.

I wonder if I could make it happen with couchapp as well.