[PCBC-153] move flush function to RESTful flush Created: 30/Nov/12  Updated: 11/Dec/12  Resolved: 04/Dec/12

Status: Resolved
Project: Couchbase PHP client library
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1.0
Security Level: Public

Type: Improvement Priority: Critical
Reporter: Matt Ingenthron Assignee: Trond Norbye
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
With Couchbase bucket types and memcached bucket types, the RESTful flush should always be used in Couchbase Server. Thus, the flush() function needs to be connected to the restful flush in libcouchbase:
https://github.com/couchbase/libcouchbase/blob/master/tools/cbc.cc#L947

 Comments   
Comment by Trond Norbye [ 30/Nov/12 ]
Is this really a _blocker_ and something we can't put in the release notes? I wouldn't assume a "non-working" flush for the couchbase buckets to be the biggest problem for people in production....
Comment by Trond Norbye [ 03/Dec/12 ]
http://review.couchbase.org/#/c/23014/
Comment by Jeff Minard [ 04/Dec/12 ]
I know this is already resolved, but I'd actually implement our own wrapper to detect "is bucket memcached? ok, flush as normal. else _alldocs, loop, delete(key)". It wasn't a big deal to implement, just annoying.
Comment by Matt Ingenthron [ 04/Dec/12 ]
Thanks Jeff

Use of _alldocs is not recommended or really supported in Couchbase Server 2.0. It works okay, but it can't walk the views in an optimal way and thus churns through disk.

The RESTful flush should be relatively speedy and will definitely be speedy in the long term and safe.
Comment by Trond Norbye [ 04/Dec/12 ]
The rest way should also work for me cached buckets
Generated at Thu Sep 18 02:51:13 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.