-
Notifications
You must be signed in to change notification settings - Fork 974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FragmentInstanceStateMachine for FragmentInstance State change #5615
Conversation
@@ -58,10 +64,51 @@ public class FragmentInstanceContext extends QueryContext { | |||
// private final AtomicLong endFullGcCount = new AtomicLong(-1); | |||
// private final AtomicLong endFullGcTimeNanos = new AtomicLong(-1); | |||
|
|||
public FragmentInstanceContext( | |||
FragmentInstanceId id, AtomicReference<FragmentInstanceState> state) { | |||
public static FragmentInstanceContext createFragmentInstance( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
createFragmentInstanceContext
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix
CounterStat failedInstances) { | ||
FragmentInstanceExecution execution = | ||
new FragmentInstanceExecution(scheduler, instanceId, context, driver, stateMachine); | ||
execution.initialize(failedInstances, scheduler, instanceId, driver); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is better understood if failedInstances
is changed to another name.
scheduler
instanceId
driver
may be duplicated because they have been passed into constructor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix
@@ -148,6 +162,19 @@ public FragmentInstanceInfo abortFragmentInstance(FragmentInstanceId fragmentIns | |||
return null; | |||
} | |||
|
|||
/** Cancels a FragmentInstance. */ | |||
public FragmentInstanceInfo cancelTask(FragmentInstanceId instanceId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that abortFragmentInstance()
do the same thing with cancelTask
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, cancel is called by user kill, abort is called by other FIs' failures in current query.
SonarCloud Quality Gate failed. |
* remotes/upstream/master: Serialize measurement schema of insert node to wal entry (apache#5638) filter non schemaRegionDir (apache#5640) [IOTDB-2976] Add English and Chinese docs for count devices and count storage groups (apache#5635) change jenkins timeout from 2 hours to 3 hours [IOTDB-2740] Equal size bucket sampling UDFs: EQUAL_SIZE_BUCKET_RANDOM_SAMPLE, EQUAL_SIZE_BUCKET_AGG_SAMPLE, EQUAL_SIZE_BUCKET_M4_SAMPLE (apache#5518) Fix the issue that EndTime in FragmentInstanceContext is not set (apache#5636) fix concurrent bug of CachedMNodeContainer.putIfAbsent (apache#5632) [IOTDB-2880] Fix NPE occured in ci test (apache#5634) Fix CI (apache#5639) Add ColumnMerger to merge multipul input columns of same sensor into one column (apache#5630) Add block cancel when GetBlockTask throws exception (apache#5628) fix the bug when matching multi-wildcard in pattern tree (apache#5631) [IOTDB-2835]Fix empty page in selfcheck method of TsFileSequenceReader (apache#5552) Add FragmentInstanceStateMachine for FragmentInstance State change (apache#5615) [IOTDB-2880] Fix import check style (apache#5629) [IOTDB-2971] Fix sink handle memory leak (apache#5626) [rocksdb] updated the interface support (apache#5625) [IOTDB-2970] Code style: Avoid wildcard imports (apache#5622) [IOTDB-2880]Add procedure framework (apache#5477) [rocksdb] add rocksdb properties (apache#5588) # Conflicts: # server/src/main/java/org/apache/iotdb/db/mpp/sql/planner/LocalExecutionPlanner.java
Driver
toIDriver
and add another newDriver
abstract class, extract duplicated code fromDataDriver
andSchemaDriver
to their parent classDriver
.DriverLock
inDriver
to prevent it from closing by others while it is still running.