File tree Expand file tree Collapse file tree
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3232import org .apache .iotdb .db .queryengine .common .FragmentInstanceId ;
3333import org .apache .iotdb .db .queryengine .common .QueryId ;
3434import org .apache .iotdb .db .queryengine .common .SessionInfo ;
35+ import org .apache .iotdb .db .queryengine .exception .MemoryNotEnoughException ;
3536import org .apache .iotdb .db .queryengine .metric .DriverSchedulerMetricSet ;
3637import org .apache .iotdb .db .queryengine .metric .QueryRelatedResourceMetricSet ;
3738import org .apache .iotdb .db .queryengine .metric .QueryResourceMetricSet ;
@@ -899,9 +900,22 @@ private void releaseTVListOwnedByQuery() {
899900 memoryReservationManager .releaseMemoryVirtually (tvList .getReservedMemoryBytes ());
900901 FragmentInstanceContext queryContext =
901902 (FragmentInstanceContext ) queryContextSet .iterator ().next ();
902- queryContext
903- .getMemoryReservationContext ()
904- .reserveMemoryVirtually (releasedBytes .left , releasedBytes .right );
903+ try {
904+ queryContext
905+ .getMemoryReservationContext ()
906+ .reserveMemoryVirtually (releasedBytes .left , releasedBytes .right );
907+ } catch (MemoryNotEnoughException ex ) {
908+ LOGGER .warn (
909+ "MemoryNotEnoughException when transferring TVList ownership from query {} to another query {}." ,
910+ this .getId (),
911+ queryContext .getId ());
912+ } catch (RuntimeException ex ) {
913+ LOGGER .warn (
914+ "Unexpected Exception when transferring TVList ownership from query {} to another query {}." ,
915+ this .getId (),
916+ queryContext .getId (),
917+ ex );
918+ }
905919
906920 if (LOGGER .isDebugEnabled ()) {
907921 LOGGER .debug (
You can’t perform that action at this time.
0 commit comments