![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi guys! This my first question here. My database need a concurrency control and I am using locks. In tests I am using 100 Threads to insert anything in database. For each insert I do: -lock_id -lock_get -txn_begin -db.put -txn.commit -lock_put This sequence for each insert is correct? |
|
To make checkpoint or syncs I need locks and transactions too? |
#3
| |||
| |||
|
|
* Yoshio: Hi guys! This my first question here. My database need a concurrency control and I am using locks. In tests I am using 100 Threads to insert anything in database. For each insert I do: -lock_id -lock_get -txn_begin -db.put -txn.commit -lock_put This sequence for each insert is correct? You don't need to use explicit locking when you use the transaction data store. Just make sure that you set the DB_THREAD flag for the environment and the databases when you use Berkeley DB from multiple threads within the same process. To make checkpoint or syncs I need locks and transactions too? You might need some lock to synchronize checkpoints, log archival and log deletion, depending on your data durability requirements. |
![]() |
| Thread Tools | |
| Display Modes | |
| |