Skip to content

Commit 3d81d07

Browse files
authored
Merge pull request #2421 from ZhouBox/v2.9
[v2.9]increase the max group limit to 1024
2 parents 52e30c8 + 534c699 commit 3d81d07

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎include/neuron/define.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#define NEU_TAG_NAME_LEN 128
3535
#define NEU_TAG_ADDRESS_LEN 128
3636
#define NEU_TAG_DESCRIPTION_LEN 128
37-
#define NEU_GROUP_MAX_PER_NODE 512
37+
#define NEU_GROUP_MAX_PER_NODE 1024
3838
#define NEU_GROUP_NAME_LEN 128
3939
#define NEU_GROUP_INTERVAL_LIMIT 100
4040
#define NEU_DEFAULT_GROUP_INTERVAL 100

‎src/event/event_linux.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ struct event_data {
6666
bool use;
6767
};
6868

69-
#define EVENT_SIZE 1400
69+
#define EVENT_SIZE 2800
7070

7171
struct neu_events {
7272
int epoll_fd;

‎tests/ft/http_api/test_http_api.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,16 @@ def test_put_drivers_with_invalid_group_interval(self):
348348

349349
@description(given="running neuron", when="put drivers with too many groups", then="should fail")
350350
def test_put_drivers_with_too_many_groups(self):
351+
351352
driver = {
352353
"name": driver_1["name"],
353354
"plugin": driver_1["plugin"],
354355
"params": driver_1["params"],
355-
"groups": [{"group": "grp", "interval": 1000, "tags": []} for _ in range(1000)]
356+
"groups": []
356357
}
358+
for i in range(1025):
359+
driver["groups"].append({"group": "grp" + str(i), "interval": 1000, "tags": []})
360+
357361
response = api.put_drivers([driver])
358362
assert 400 == response.status_code
359363
assert error.NEU_ERR_GROUP_MAX_GROUPS == response.json()['error']

0 commit comments

Comments
 (0)