-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit d6ceec8
committed
Work around Redis parameter limitation
Redis has a [limitation of 1024*1024
parameters](https://github.com/antirez/redis/blob/4.0.9/src/networking.c#L1200) for bulk operations.
To insert more than 1024*1024/2-1 entries with putAll(), they need to be
split up in multiple HMSET commands.
To reveive more than 1024*1024-1 entries with entrySet(), we can
directly use the HGETALL command instead of first fetching the keys with
HKEYS and then fetching the values with HMGET.1 parent e0b73c7 commit d6ceec8
File tree
4 files changed
+34
-34
lines changed- src
- main/java/org/springframework/data/redis
- core
- support/collections
- test/java/org/springframework/data/redis/support/collections
4 files changed
+34
-34
lines changedLines changed: 14 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 | - | ||
19 | - | ||
20 | - | ||
21 | - | ||
22 | - | ||
18 | + | ||
23 | 19 |
| |
24 | - | ||
25 | 20 |
| |
26 | 21 |
| |
27 | 22 |
| |
| |||
141 | 136 |
| |
142 | 137 |
| |
143 | 138 |
| |
144 | - | ||
139 | + | ||
140 | + | ||
145 | 141 |
| |
146 | - | ||
142 | + | ||
143 | + | ||
144 | + | ||
147 | 145 |
| |
148 | - | ||
149 | 146 |
| |
150 | - | ||
151 | - | ||
152 | - | ||
153 | - | ||
147 | + | ||
148 | + | ||
149 | + | ||
150 | + | ||
151 | + | ||
152 | + | ||
153 | + | ||
154 | + | ||
154 | 155 |
| |
155 | 156 |
| |
156 | 157 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
85 | 85 |
| |
86 | 86 |
| |
87 | 87 |
| |
88 | + | ||
89 | + | ||
88 | 90 |
| |
89 | 91 |
| |
90 | 92 |
| |
|
Lines changed: 1 addition & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
155 | 155 |
| |
156 | 156 |
| |
157 | 157 |
| |
158 | - | ||
159 | - | ||
160 | - | ||
161 | - | ||
162 | - | ||
163 | - | ||
164 | - | ||
165 | - | ||
166 | - | ||
167 | - | ||
168 | - | ||
169 | - | ||
170 | - | ||
171 | - | ||
158 | + | ||
172 | 159 |
| |
173 | 160 |
| |
174 | 161 |
| |
|
Lines changed: 17 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 | - | ||
26 | - | ||
27 | - | ||
28 | - | ||
29 | - | ||
30 | - | ||
25 | + | ||
31 | 26 |
| |
32 | - | ||
33 | 27 |
| |
34 | 28 |
| |
35 | 29 |
| |
| |||
396 | 390 |
| |
397 | 391 |
| |
398 | 392 |
| |
393 | + | ||
394 | + | ||
395 | + | ||
396 | + | ||
397 | + | ||
398 | + | ||
399 | + | ||
400 | + | ||
401 | + | ||
402 | + | ||
403 | + | ||
404 | + | ||
405 | + | ||
406 | + | ||
407 | + | ||
408 | + | ||
399 | 409 |
| |
400 | 410 |
| |
401 | 411 |
| |
|
0 commit comments