by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 06 2016 17:57
    test2
  • Jan 06 2016 17:56
    test
Himanshu Gupta
@himanshumps
The n/w is same for test for 20 users vs 100 users. Couchbase maintains a long running persistent connection with server and transferring 100 documents of 2 kb each should not matter as at most you are transferring 200 kb. Now coming to disk io at client side. Everything is happening in memory and there should be no disk io involved. On server side we have raid/flash storage and we are fetching same set of keys. So they should be in RAM and agin there is no disk io on server side. All the document are 100% in memory as per the console. We do have dba and they have checked and told there is nothing wrong at server side by pulling the get call report
BarathKumarDharani
@BarathKumarDharani
I am trying to couchbase latest feature transaction. I am getting below error . Could you please guide me on this .
com.couchbase.transactions.error.TransactionFailed: Transaction has failed with cause 'com.couchbase.client.core.error.DurabilityImpossibleException: With the current cluster configuration, the requested durability guarantees are impossible
Frank Lemanschik
@frank-dspeed
@himanshumps ok i would still consider to let some one look into this
and saying everything is in ram is simply wrong most time
there are reasons why threre are disk considerations for some stuff
but you can make a funny experiment install memcached
and look how it performs couchbase is based on mencacged
what kind of ram and cpu are u using?
what is the clocking of the ram?
Himanshu Gupta
@himanshumps
@frank-dspeed Let me get those details as I need to get them from DBA. I will get back to you with that.
mfeerick
@mfeerick
I have a bucket which only contains binary documents
How can i find the average size of those binaries?
mfeerick
@mfeerick
select avg(length(ENCODE_JSON(default))) from default. looking for something like this
but it doesnt work on binary type
matrixbot
@matrixbot
Antony.H Hello, everybody! I have no experience to Couchbase and is trying to know it more. I would like to some practical example on database design principles or pattern for Couchbase. Especially Developer Preview has introduced Scope and Collection. The Collection is a confusing me.
matrixbot
@matrixbot
Antony.H If I assume I do not have Collection yet, how should I store my data for different classes/structures?
Antony.H Put them into the single bucket and give them different indices?
Brant Burnett
@brantburnett
@matrixbot A typical use case for scope/collections would be scope to separate apps (i.e. scope per microservice) and collection to separate types of documents (i.e. orders vs customers). However, the pattern typically used today (since that is only in preview) is to place a "type" attribute on each document to differentiate them. Often this type is also included as part of the document key.
Indexing is a bit more complicated. A common pattern is to use a WHERE clause on the index to filter it to documents of a specific type. However, depending on your use case you can also index across multiple document types in a single index to gain some efficiencies.
matrixbot
@matrixbot
Antony.H Thanks Brant Burnett (Gitter) ! Sounds very nice for microservices!
Antony.H Then we don't have to isolate all data models strictly and only accessible by their own data services.
Brant Burnett
@brantburnett
yes, today we typically also put a "service" attribute on each doc to identify which microservice owns the doc to help provide that separation, but I'm excited about using scopes/collections when it's GA
matrixbot
@matrixbot
Antony.H And I can also imagine a system design which can handle transaction operation with consistency using Couchbase.
Antony.H Couchbase is like born for microservices architecture.
Sunil Koni
@sunilkoni
Hi Guys I am using Couchbasemock testing some of my functionality it worked fine until today I added some extended queries to my repository suddenly I started getting exception "Error creating bean, UnsupportedCouchbaseFeatureException Repository uses N1QL query". On googling got to know that couchbaseMock does not support N1QL queries. any views on it are really appreciated.
Liudmila Kornilova
@kornilova203

Hi all! We are adding Couchbase support to JetBrains IDEs. We want to show correct errors when something goes wrong e.g. user mistypes credentials. I cannot figure out how to obtain cause error in Java SDK 3.0.8:
I create a cluster with wrong credentials and try to execute a query. I get a very confusing error:

com.couchbase.client.core.error.FeatureNotAvailableException: The cluster does not support cluster-level queries (only Couchbase Server 6.5 and later)

But I see correct error in log:

Authentication Failure {"circuitBreaker":"DISABLED","coreId":"0x7038858c00000001","remote":"localhost:11210","status":"UNKNOWN","type":"KV","xerror":{"ref":"21a6eea7-b59b-42b3-3765-71e38602afbb"}}

How do I get correct Authentication Failure error instead of FeatureNotAvailableException

My code:

Cluster cluster = Cluster.connect("localhost", "wrong", "password");
    try {
      QueryResult result = cluster.query("select 1");
      System.out.println(result);
    }
    catch (Exception e) {
      e.printStackTrace(); // FeatureNotAvailableException instead of authentication failed exception
    }
Niranjan
@nnanda2016

@kornilova203 this is a known issue. With SDK 3.x Query service' scope is cluster instead of bucket. But the SDK still requires bucket to be opened before query invocation (may be because data is still inside a bucket). Mu guess is - this is an incomplete feature which will be addressed/taken care when Collection feature will be released.

CB team can add better answer. :)

For now, just open a bucket before query execution and that should work. I have updated your code and shown below.

// This is all your code....
Cluster cluster = Cluster.connect("localhost", "wrong", "password");

// This should suppress the feature related exception.
Bucket b = cluster.openBucket("b"); 
    try {
      QueryResult result = cluster.query("select 1");
      System.out.println(result);
    }
    catch (Exception e) {
      e.printStackTrace(); // FeatureNotAvailableException instead of authentication failed exception
    }
Michael Nitschinger
@daschl
@kornilova203 Hi, Java SDK maintainer here. As @nnanda2016 pointed out this is becuase you need to have at least one bucket open IFF you are running against a cluster that is older than 6.5
note that there is no authentication failure you are getting because auth is running in the background. for something like KV ops
maybe we should take this (potentially longer) discussion aside? I’m very interested in helping you succeed with this but I assume its a longer conversation w.r.t api needs etc
Liudmila Kornilova
@kornilova203
@nnanda2016, thank you for reply! Unfortunately opening a bucket did not change error.
I'm using Couchbase 6.6 so query executes successfully without opening a bucket (and with correct credentials)
@daschl, thank you, is there a way to get an error that is thrown in background auth process? Maybe there is an issue in bug tracker that I can subscribe to?)
Michael Nitschinger
@daschl
Well there are a couple ways to tackle this, including an event bus in the SDK - let’s sync up on the specifics in a side discussion I guess
Lior Rabin
@LiorRabin
Hello, I'm trying to run the Couchbase autonomous operator 2.0 on k8s. I've installed using helm, but can't seem to figure out how to run on dedicated instances (using tolerations and affinity). Can anyone share their values.yaml or some pointers on how to run?
Running on AWS (using Rancher)
Getting this warning coalesce.go:196: warning: cannot overwrite table with non table for servers (map[default:map[pod:map[spec:map[containers:<nil>]] serverGroups:[] services:[data index query search analytics eventing] size:3 volumeMounts:map[]]]) on helm upgrade
Brant Burnett
@brantburnett
We haven't quite switched to 2.0 yet (next week actually), but I can share what we do on 1.2 @LiorRabin
it should be similar
For each pod defined in the YAML, we'll add this block:
nodeSelector:
  centeredge.io/service: couchbase
tolerations:
  - key: couchbase
    operator: Equal
    value: highmemory
    effect: NoSchedule
each node we want used for Couchbase gets a label:
centeredge.io/service: couchbase
and a taint:
taints:
- effect: NoSchedule
  key: couchbase
  value: highmemory
The value of the taint represents the node type since we use multi-dimensional scaling, so we can target different services to different node sizes
Brant Burnett
@brantburnett
The label combined with the nodeSelector ensures that Couchbase goes on these nodes and not on the general use nodes
The taint combined with the toleration ensures that general use services don't get scheduled on these nodes
kind of a two-part deal
unfortunately we're not using Helm for our deployments, so I'm unsure of any subtleties there with values.yaml
Lior Rabin
@LiorRabin
Thanks for the answer @brantburnett . But looks like it doesn't quite suit the documentation for the 2.0 version I guess :|