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

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.0
    • Component/s: None
    • Labels:
      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.1.patch
          0.7 kB
          Barna Zsombor Klara
        2. HIVE-15168.2.patch
          2 kB
          Barna Zsombor Klara
        3. HIVE-15168.patch
          10 kB
          Barna Zsombor Klara

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: