aditya-gupta36 opened a new pull request, #463: URL: https://github.com/apache/atlas/pull/463
Example: When performing a search of entities i particular typedef let's say: "hdfs_path", if the number of entities exceeds the default pagination limit (25), the approximateCount field in the AtlasSearchResult incorrectly reports only 25, even when more entities exist. Also, if we decrease the pagination limit to any random number lets say 5, the approximate count will be shown as 5 Before the Fix: Create 26 entities of a type. Perform a search using the API without explicitly setting limit and offset (defaults to 25). Observe that approximateCount is reported as 25 instead of 26 After the Fix approximateCount value is reported as totalEntityCount present in particular typedefinition Fix Done: Capture the total Enitity count before you apply the limit/offset Repro of the Issue: as we have 26 entities. request: curl 'http://localhost:21000/api/atlas/v2/search/basic' \ -H 'Accept: application/json, text/plain, /' \ -H 'Accept-Language: en-US,en;q=0.9' \ -H 'Connection: keep-alive' \ -H 'Content-Type: application/json' \ -b 'ATLASSESSIONID=node0ilpfq8b9zw701pbgowuqmrjqf1.node0' \ -H 'Origin: http://localhost:21000/' \ -H 'Referer: http://localhost:21000/n3/index.html' \ -H 'Sec-Fetch-Dest: empty' \ -H 'Sec-Fetch-Mode: cors' \ -H 'Sec-Fetch-Site: same-origin' \ -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36' \ -H 'X-XSRF-HEADER: eDoGUqSdiDGwTZoV88ui' \ -H 'sec-ch-ua: "Chromium";v="140", "Not=A?Brand";v="24", "Google Chrome";v="140"' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'sec-ch-ua-platform: "Linux"' \ --data-raw '{"excludeDeletedEntities":true,"includeSubClassifications":true,"includeSubTypes":true,"includeClassificationAttributes":true,"entityFilters":null,"tagFilters":null,"attributes":[],"limit":25,"offset":0,"relationship Filters":null,"typeName":"hdfs_path","classification":null,"termName":null}' setting limit as 25 as above in curl request shown. so were getting in the respone: ], "approximateCount": 25 Test: UI Test, Mvn Build for whole Atlas -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
