[
https://issues.apache.org/jira/browse/ATLAS-5163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Aditya Gupta updated ATLAS-5163:
--------------------------------
Description:
The approxCount value in Relationship Search is returned based on the requested
limit value instead of actual total number of relationships found.
Consider Total Relationship = 30(hive_table_db)
|*Limit Set (L)*|*Approx Count Returned*|*Expected Count*|*Reason (Bug)*|
|*0*|30|30|The logic defaulted to the total count when no limit was set.|
|*1*|*1*|30|The count was incorrectly capped by the small limit.|
|*29*|*29*|30|The count was incorrectly capped by the limit.|
|*31*|*30*|30|Since the limit (31) was greater than the total (30), the total
was returned.|
was:
*Jira Summary:* Fixes a bug in Relationship Search where the {{approxCount}}
field was incorrectly calculated based on the requested {{limit}} value, rather
than the actual total number of relationships found.
Relationship Search API was supposed to tell you the *total number of related
entities* (the {{{}approxCount{}}}), even if you only asked for a small set of
results on one page (using the {{limit}} parameter).
*The problem was* that the system would often lie about the total count.
Instead of giving you the true total (say, 30), it would just give you the
value you set for the {{{}limit{}}}.
h3. Consider Total Relationship = 30(hive_table_db)
h3. Example of the Bug (Total is 30)
* If you searched and set the page {{limit}} to {*}5{*}, the API incorrectly
reported the total count ({{{}approxCount{}}}) as {*}5{*}, even though there
were actually 30 relationships.
* If you set the page {{limit}} to {*}29{*}, the API reported the total count
as {*}29{*}.
h3. Example After the Fix (Total is 30)
* Regardless of whether you set the page {{limit}} to {*}1{*}, {*}10{*}, or
{*}35{*}, the API now correctly and consistently reports the total number of
relationships ({{{}approxCount{}}}) as {*}30{*}.
> Relationship Search API approximateCount returns pageLimit value instead of
> total relationship count
> ----------------------------------------------------------------------------------------------------
>
> Key: ATLAS-5163
> URL: https://issues.apache.org/jira/browse/ATLAS-5163
> Project: Atlas
> Issue Type: Bug
> Reporter: Aditya Gupta
> Assignee: Aditya Gupta
> Priority: Major
>
> The approxCount value in Relationship Search is returned based on the
> requested limit value instead of actual total number of relationships found.
> Consider Total Relationship = 30(hive_table_db)
> |*Limit Set (L)*|*Approx Count Returned*|*Expected Count*|*Reason (Bug)*|
> |*0*|30|30|The logic defaulted to the total count when no limit was set.|
> |*1*|*1*|30|The count was incorrectly capped by the small limit.|
> |*29*|*29*|30|The count was incorrectly capped by the limit.|
> |*31*|*30*|30|Since the limit (31) was greater than the total (30), the total
> was returned.|
--
This message was sent by Atlassian Jira
(v8.20.10#820010)