Skip to content

Commit

Permalink
fix(tags) use entity count as entity index
Browse files Browse the repository at this point in the history
For tag-filtered queries in Cassandra, use the current entity count as
the entity table index rather than the row iteration counter. If some
entities are excluded from the table, this ensures that no table indices
have a nil value. Kong Enterprise filters these results to exclude
entities in other workspaces.
  • Loading branch information
Travis Raines authored and hishamhm committed Oct 14, 2019
1 parent b825a6d commit 23bde47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kong/db/strategies/cassandra/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1142,8 +1142,8 @@ do
clear_tab(current_entity_ids)
current_entity_count = 0
for i, row in ipairs(rows) do
current_entity_ids[i] = row.entity_id
current_entity_count = current_entity_count + 1
current_entity_ids[current_entity_count] = row.entity_id
end
end
end
Expand Down

0 comments on commit 23bde47

Please sign in to comment.