Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-15058 [Umbrella] Current Flaky Tests
  3. HIVE-15168

Flaky test: TestSparkClient.testJobSubmission (still flaky)

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.3.0
    • None
    • None

    Description

      HIVE-14910 already addressed one source of flakyness bud sadly not all it seems.
      In JobHandleImpl the listeners are registered after the job has been submitted.
      This may end up in a racecondition.

       // Link the RPC and the promise so that events from one are propagated to the other as
            // needed.
            rpc.addListener(new GenericFutureListener<io.netty.util.concurrent.Future<Void>>() {
              @Override
              public void operationComplete(io.netty.util.concurrent.Future<Void> f) {
                if (f.isSuccess()) {
                  handle.changeState(JobHandle.State.QUEUED);
                } else if (!promise.isDone()) {
                  promise.setFailure(f.cause());
                }
              }
            });
            promise.addListener(new GenericFutureListener<Promise<T>>() {
              @Override
              public void operationComplete(Promise<T> p) {
                if (jobId != null) {
                  jobs.remove(jobId);
                }
                if (p.isCancelled() && !rpc.isDone()) {
                  rpc.cancel(true);
                }
              }
            });
      

      Attachments

        1. HIVE-15168.patch
          10 kB
          Barna Zsombor Klara
        2. HIVE-15168.2.patch
          2 kB
          Barna Zsombor Klara
        3. HIVE-15168.1.patch
          0.7 kB
          Barna Zsombor Klara

        Issue Links

          Activity

            People

              zsombor.klara Barna Zsombor Klara
              zsombor.klara Barna Zsombor Klara
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: