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

threads created during classload-static sections open commitlog handles

    XMLWordPrintableJSON

Details

    • Low

    Description

      Some classes, such as org.apache.cassandra.db.commitlog.CommitLog create threads in static blocks. Some of these threads then open file-descriptors for the commitlog (and possibly sstables).

      ...
      public static final CommitLog instance = CommitLog.construct();
      ...
      private static CommitLog construct()
      {
          CommitLog log = new CommitLog(DatabaseDescriptor.getCommitLogLocation(), CommitLogArchiver.construct());
          ....
          return log.start();
      }
      ...
      

      If this occurs in a non-daemon process such as nodetool, or any of the other sstable tools it could prevent a CassandraDaemon from deleting commitlog files.

      These threads should only open files automatically if the process is a CassandraDaemon, not if it's a utility.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Nathan.Jackels Nathan Jackels
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: