session endSession

Performance: Resource Release After High-Memory Operations

Scénario de test & Cas d'usage

Business Context

In a Fraud Detection scenario, huge transaction history tables are loaded into memory for real-time model training. The test ensures that invoking endSession immediately following a high-memory operation effectively closes the connection, validating that the command remains responsive even when the session holds significant data.
About the Set : session

Management of the CAS session state.

Discover all actions of session
Data Preparation

Creation of a larger dummy transaction dataset.

Copied!
1 
2DATA work.transactions;
3DO i=1 to 5000;
4trans_id=i;
5amount=i*10;
6category='RETAIL';
7OUTPUT;
8END;
9 
10RUN;
11 

Étapes de réalisation

1
Load large dataset into global scope.
Copied!
1PROC CAS;
2 upload path="work.transactions" casout={name="transactions", replace=true, promote=true};
3 TABLE.tableDetails TABLE="transactions";
4RUN;
2
Execute endSession immediately to verify responsiveness under load.
Copied!
1PROC CAS;
2 SESSION.endSession;
3RUN;

Expected Result


The session closes immediately despite the memory footprint of the loaded tables. The action does not hang or timeout.