I am trying to generate 50k users, 5k groups, and add each user to about 10 groups which produce 500k memberships with `script/traffic_replay`.
store backend is tdb. Server is a openstack instance with 4 CPUs and 4G mem.
The creation of users and groups are working fine, but adding users to groups will fail with lock error.
The error is stable, I reproduced the error when I tried it again for a few times.
mdb is working fine.
INFO 2018-10-17 20:42:36,428 pid:11227 bin/python/samba/emulate/traffic.py #1718: 1539762156.428459 0 create group 0.037660 True
INFO 2018-10-17 20:42:36,466 pid:11227 bin/python/samba/emulate/traffic.py #1718: 1539762156.466589 0 create group 0.037734 True
Generating groups took 344.71756196 secs
Assigning users to groups
Assigning users took 5.06887698174 secs
Adding users to groups
ltdb: tdb(/usr/local/samba/private/sam.ldb.d/DC=SAMDOM,DC=EXAMPLE,DC=COM.ldb): tdb_transaction_prepare_commit: failed to upgrade hash locks: Locking error
ltdb: tdb(/usr/local/samba/private/sam.ldb.d/DC=SAMDOM,DC=EXAMPLE,DC=COM.ldb): ../lib/tdb/common/tdb.c:1098 Failed to commit
Traceback (most recent call last):
File "./script/traffic_replay", line 399, in <module>
File "./script/traffic_replay", line 332, in main
File "bin/python/samba/emulate/traffic.py", line 1813, in generate_users_and_groups
add_users_to_groups(ldb, instance_id, assignments)
File "bin/python/samba/emulate/traffic.py", line 1959, in add_users_to_groups
_ldb.LdbError: (51, 'end_trans error on DC=samdom,DC=example,DC=com: Failure during tdb_transaction_commit(): Locking error -> Busy')