WritebackListener thread can die while handling exceptions

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.2.5, 2.3.2
    • Affects Version/s: 2.3.1
    • Component/s: Sharding
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Problem code:

                  catch ( std::exception& e ) {
      
                      if ( inShutdown() ) {
                          // we're shutting down, so just clean up
                          return;
                      }
      
                      log() << "WriteBackListener exception : " << e.what() << endl;
      
                      // It's possible this shard was removed
                      Shard::reloadShardInfo();
                  }
      

      Note that reloadShardInfo can also throw exceptions and since it is not handled in the run method, the writeback listener thread would just terminate. Sample scenarios that reloadShardInfo can throw is when config servers are unreachable.

            Assignee:
            Randolph Tan
            Reporter:
            Randolph Tan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: