Java (Java Agent, Installation, JVM, and Controller Installation)

cancel
Showing results for 
Search instead for 
Did you mean: 

Same set of functions called repetitively in appdynamics call stack without recursion

Same set of functions called repetitively in appdynamics call stack without recursion

Please see the attached screenshot of my call stack. We can see that in the root function, at the same level, two functions - loadPersonalDateRange and getCompleteWpDailyKinmuDataCollection  are called again and again despite the fact that the parent function has no type of recursion and hence, it should call each of these functions only once, not multiple times in the same order. Any idea on why the call stack shows this kind of trace?

 

Screenshot from 2018-12-21 16-00-39.png

Same set of functions called repetitively in appdynamics call stack without recursion
5 REPLIES
Employee

Re: Same set of functions called repetitively in appdynamics call stack without recursion

Is the code retrieving some kind of large result set from the database?

 

If so, that would probably explain what you're seeing.



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Re: Same set of functions called repetitively in appdynamics call stack without recursion

Yes, it indeed is accessing data from a large database. Could you please explain a bit clearly why is this happening?

Re: Same set of functions called repetitively in appdynamics call stack without recursion

Hi Peter,

 

Just in case you didn't receive my previous question, I just wanted to ask if you could explain your answer a bit more in detail? There is data retrieval from a big database, indeed.

Re: Same set of functions called repetitively in appdynamics call stack without recursion

Hi @Peter.Holditch Sorry for posting again (didn't know we can tag users like this). Could you please explain bit more clearly why there are repititions when the retrieval is from a large database?

 

Thanks,

Employee

Re: Same set of functions called repetitively in appdynamics call stack without recursion

I suspect in this case that the exit to the database (which is the instrumented method) is being called multiple times within the higher levels of the database driver as it iterates across the large result set you are retrieving.

 

In that case, you see one entry in the snapshot per iteration.



Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.