summaryrefslogtreecommitdiff
path: root/src/node_flat.erl
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2017-12-28 11:48:54 +0100
committerChristophe Romain <christophe.romain@process-one.net>2017-12-28 11:48:54 +0100
commit08e54dd6210550b5082ff4b8478243adac7884a0 (patch)
treec2e4717f3ab0b93540d0eceb662c00392f849337 /src/node_flat.erl
parentRevert "Include os_mon application" (diff)
Don't force rsm when max_items is not defined (#2189)
Diffstat (limited to 'src/node_flat.erl')
-rw-r--r--src/node_flat.erl9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/node_flat.erl b/src/node_flat.erl
index 9de64d1a..18995036 100644
--- a/src/node_flat.erl
+++ b/src/node_flat.erl
@@ -734,14 +734,7 @@ del_state(#pubsub_state{stateid = {Key, Nidx}, items = Items}) ->
get_items(Nidx, _From, undefined) ->
RItems = lists:keysort(#pubsub_item.creation,
mnesia:index_read(pubsub_item, Nidx, #pubsub_item.nodeidx)),
- Count = length(RItems),
- if Count =< ?MAXITEMS ->
- {result, {RItems, undefined}};
- true ->
- ItemsPage = lists:sublist(RItems, ?MAXITEMS),
- Rsm = rsm_page(Count, 0, 0, ItemsPage),
- {result, {ItemsPage, Rsm}}
- end;
+ {result, {RItems, undefined}};
get_items(Nidx, _From, #rsm_set{max = Max, index = IncIndex,
'after' = After, before = Before}) ->