Support Article

Node level Declare Page running for multiple users

SA-13668

Summary



There is a node level declare (data) page that expires every 24 hours. It loads approximately 2500 rows of data from a mainframe service call and takes approximately 1-2 minutes to complete. In Pega 7.1, the page is being loaded multiple times if more than one user accesses it after expiration during the 1-2 minutes it takes to load. This did not occur in PRPC 6.1. 

Error Messages



No error but many users are loading this same node level page which is very expensive.


Steps to Reproduce



Create node level declare page that takes some time to load to completion. Expire / flush the declare page. Have multiple users access the page at the same time.


Root Cause



While loading a node level data page in a thread, one acquires a lock on a processing valve and release the lock after loading. All other thread which tries to load the same page has to wait for the lock held by former(first) thread. After the page is ready, FIRST thread releases the lock and then PUTS this page into the directory. The put operation occurs outside the lock window. Since the lock is free now, any thread can take it and start the loading the same page, if it is already NOT PRESENT in directory. 

There is a race condition where one thread has finished loading the page and is about to do two things: 
1. Release the lock 
2. Put the page in directory. 

As soon as it release the lock, other thread grabs this lock and try to search the page in directory , it doesn't find any because the PUT operation has been completed yet by First Thread. So it tries to reload the same page again and succeeds. 

Resolution



HFix-23310 refactor loadDataPage method in ReadOnlyDataPageHandler class to handle required synchronization for node level data pages and helps resolve this issue.

 

Suggest Edit

Published August 30, 2015 - Updated October 8, 2020


100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.