sanpwc commented on a change in pull request #399:
URL: https://github.com/apache/ignite-3/pull/399#discussion_r732736375
##########
File path:
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
##########
@@ -681,11 +785,35 @@ private void dropTableLocally(String name, IgniteUuid
tblId, List<List<ClusterNo
/** {@inheritDoc} */
@Override public void dropTable(String name) {
- dropTableAsync(name).join();
+ if (!busyLock.enterBusy())
+ throw new IgniteException("Operation has been cancelled (node is
stopping).");
+ try {
+ dropTableAsync(name).join();
+ }
+ finally {
+ busyLock.leaveBusy();
+ }
}
/** {@inheritDoc} */
@Override public CompletableFuture<Void> dropTableAsync(String name) {
Review comment:
Am I right that here and for other async operations future will complet
with IgniteException or ExecutionException that will have NodeStoppingException
as root one in case of concurrent node stop? Do we have tests for this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]