Forum Discussion
Hi Patrick,
Thanks for your response. Yes it is clear now.
And one more question, does this getList makes n no.of connections to NS for retrieving n no.of custom fields? Because we are seeing 2 extra getList records in the log for one NS search
Thanks in advance.
- ptaylor5 years agoEmployee
This has me a bit stumped. Are there any other NetSuite snaps in the same pipeline, or in a separate pipeline that might be executing at the same time? Like a NetSuite Create or Update?
Also, please tell me more about your Search. Is it an advanced search?
- teja5 years agoNew Contributor
We are using NS search with advanced option enabled. Our pipeline is having NS search, NS Update , NS Get Snaps. It is a single pipeline with more than 2 NS snaps .
And let’s say if we have got 3 records from the saved search , does the snap uses getList action per record basis or is it going to be a single getList for those 3 records ?
- ptaylor5 years agoEmployee
The two rows at the end with getList and otherCustomField are happening after the search. I think those calls are coming from a snap that follows – probably the Update.
Can I please see a screenshot of your pipeline?
- ptaylor5 years agoEmployee
And to answer your question:
A single snap should retrieve the metadata only once during a single execution, and use it to process every input document regardless of how many there are.
However, if you have multiple snaps in the same pipeline that use the same metadata for the same custom fields, they might both try to retrieve the metadata in parallel. We cache the metadata when we get a response, but if the second snap attempts to get the metadata while the request started by the first snap is still executing, it won’t be in the cache so the second snap will start an identical request. That might be what you’re seeing here. That’s something we could fix with a bit more optimization – the second snap could realize that there’s a request in progress for the metadata it needs so it should wait for it rather than start another request to get the same metadata.
Also, the caches expire after a few minutes, since the metadata might change over time, so you’ll see the same fetches happen again later when you run the pipeline again.