Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-3494

Streaming is mono-threaded (the bulk loader too by extension)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.1.0
    • None
    • None

    Description

      The streamExecutor is define as:

      streamExecutor_ = new DebuggableThreadPoolExecutor("Streaming", Thread.MIN_PRIORITY);
      

      In the meantime, in DebuggableThreadPoolExecutor.java:

      public DebuggableThreadPoolExecutor(String threadPoolName, int priority)
      {
         this(1, Integer.MAX_VALUE, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new NamedThreadFactory(threadPoolName, priority));
      }
      

      In other word, since the core pool size is 1 and the queue unbounded, tasks will always queued and the executor is essentially mono-threaded.
      This is clearly not necessary since we already have stream throttling nowadays. And it could be a limiting factor in the case of the bulk loader.

      Besides, I would venture that this maybe was not the intention, because putting the max core size to MAX_VALUE would suggest that the intention was to spawn threads on demand.

      Attachments

        1. 0001-cleanup-DTPE.patch
          5 kB
          Sylvain Lebresne
        2. CASSANDRA-3494-0.8-prelim.txt
          9 kB
          Peter Schuller
        3. CASSANDRA-3494-1.0.txt
          9 kB
          Peter Schuller

        Issue Links

          Activity

            People

              scode Peter Schuller
              slebresne Sylvain Lebresne
              Peter Schuller
              Yuki Morishita
              Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: