Uploaded image for project: 'Java Couchbase JVM Core'
  1. Java Couchbase JVM Core
  2. JVMCBC-402

Async query row callbacks happen only on computation threadpool

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      Even if callbacksOnIoPool is enabled, query row callbacks happen only on computation thread. It will improve performance for ycsb likes, if the callback happened directly on the io thread.

      Example

      bucket.async().query(N1qlQuery.simple(query))
                    .flatMap(new Func1<AsyncN1qlQueryResult, Observable<AsyncN1qlQueryRow>>() {
                      @Override
                      public Observable<AsyncN1qlQueryRow> call(AsyncN1qlQueryResult result) {
                          LogThreadInfo("%d - %s", Thread.currentThread());
                          return result.rows();
                      }
                  }).flatMap(new Func1<AsyncN1qlQueryRow, Observable<JsonDocument>>() {
                        @Override
                        public Observable<JsonDocument> call(AsyncN1qlQueryRow row) {
                            LogThreadInfo("%d - %s", Thread.currentThread());
                            return bucketExt.async().get((String)row.value().get("id"));
                        }
                  }).subscribe()
      

      Callback threads
      16 - cb-io-1-3
      22 - cb-computations-1

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          There are no comments yet on this issue.

          People

            subhashni Subhashni Balakrishnan (Inactive)
            subhashni Subhashni Balakrishnan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty