vldpyatkov commented on a change in pull request #399:
URL: https://github.com/apache/ignite-3/pull/399#discussion_r733618742
##########
File path:
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java
##########
@@ -819,21 +970,59 @@ private void dropTableLocally(String name, IgniteUuid
tblId, List<List<ClusterNo
/** {@inheritDoc} */
@Override public Table table(String name) {
- return tableAsync(name).join();
+ if (!busyLock.enterBusy())
+ throw new IgniteException("Operation has been cancelled (node is
stopping).");
+ try {
+ return tableAsync(name).join();
+ }
+ finally {
+ busyLock.leaveBusy();
+ }
}
/** {@inheritDoc} */
@Override public CompletableFuture<Table> tableAsync(String name) {
- return tableAsync(name, true);
+ if (!busyLock.enterBusy())
+ throw new IgniteException("Operation has been cancelled (node is
stopping).");
+ try {
+ return tableAsync(name, true);
+ }
+ finally {
+ busyLock.leaveBusy();
+ }
}
/** {@inheritDoc} */
- @Override public TableImpl table(IgniteUuid id) {
- return tableAsync(id).join();
+ @Override public TableImpl table(IgniteUuid id) throws
NodeStoppingException {
Review comment:
Updated,
--
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]