[ https://issues.apache.org/jira/browse/RANGER-3469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17435497#comment-17435497 ]
David Mollitor commented on RANGER-3469: ---------------------------------------- [~vel] Are you able to consume from GitHub? https://github.com/apache/ranger/pull/119 > Off-By-One Error in XUser Syncing > --------------------------------- > > Key: RANGER-3469 > URL: https://issues.apache.org/jira/browse/RANGER-3469 > Project: Ranger > Issue Type: Improvement > Components: Ranger > Reporter: David Mollitor > Priority: Minor > > {code:java|title=PolicyMgrUserGroupBuilder.java} > int uploadedCount = -1; > int pageSize = Integer.valueOf(recordsToPullPerCall); > while (uploadedCount < totalCount) { > ... > GetXGroupListResponse pagedXGroupList = new GetXGroupListResponse(); > int pagedXGroupListLen = uploadedCount+pageSize; > > pagedXGroupList.setXgroupInfoList(xGroupList.getXgroupInfoList().subList(uploadedCount+1,pagedXGroupListLen>totalCount?totalCount:pagedXGroupListLen)); > {code} > The size of the first batch of users to sync is: > {code:java} > int uploadedCount = -1; > // default in value is 1000 > int pageSize = Integer.valueOf(recordsToPullPerCall); > // value is 1000 + -1 = 999 > int pagedXGroupListLen = uploadedCount+pageSize; > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)