Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Membase | Membase Server 1.7.x

Enyim client.FlushAll() seems to be causing me problems with the TAP Protocol

1 reply [Last post]
  • Login or register to post comments
Wed, 11/16/2011 - 17:15
sthoman
Offline
Joined: 11/16/2011
Groups: None

Not sure whether this is related to membase or the Enyim client, but any help would be appreciated.

I am writing a C# application using membase for persistence. Using the Enyim library to interact with membase as well as the TAP protocol. For the TAP protocol I am just running tap_example.py and routing its std output to my application.

Basically I am seeing that anytime I call client.FlushAll() my TAP stream stops coming through:

static void Main(string[] args)
{

MembaseClientConfiguration config = new MembaseClientConfiguration();

config.Urls.Add(new Uri("http://localhost:8091/pools/default"));

var client = new MembaseClient(config, "default", "mypassword");

client.Store(StoreMode.Set, "Test1", "A");
client.Store(StoreMode.Set, "Test2", "B");

MembaseTap tap = new MembaseTap(key =>
{
Console.WriteLine(key);
});

tap.Wait();

// client.FlushAll();

The preceding code works fine and prints out the TAP stream results as long as client.FlushAll() is commented out. As soon as I uncomment it, it stops working thereafter, even if I re-comment it out. I am 100% positive that the keys are in the database. One thing worth noting is the MembaseTap is done asynchronously and the anonymous method I pass in occurs for each line of the standard TAP output thats redirected. But overall I don't think that should be a problem. Even if I wait for TAP to finish / time-out before the flush I have this problem.

Also I should mention that the only way I know of to get my TAP stream working again is to restart my computer. It seems like maybe some process is lingering somewhere and causing issues, but I haven't been able to isolate it yet.

IS there any possible relationship between calling client.FlushAll (which I presume calls membase flush commands under the hood?) and disrupting the TAP protocol functionality? The problem doesn't make sense to me so I'd appreciate any input. Thanks!

Top
  • Login or register to post comments
Sun, 11/27/2011 - 10:05
ingenthr
Offline
Joined: 03/16/2010
Groups:

TAP kind of inverts the protocol handling, so it could be that the client is stuck in that state after the tap commannd is started. I'll. look into documenting this if its the case. Can you try creating a new client object to do the flush?

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker