… | |
… | |
644 | |
644 | |
645 | COMMON PITFALLS |
645 | COMMON PITFALLS |
646 | Unexpected Crashes |
646 | Unexpected Crashes |
647 | Remember that, by default, BDB will execute requests in parallel, in |
647 | Remember that, by default, BDB will execute requests in parallel, in |
648 | somewhat random order. That means that it is easy to run a "db_get" |
648 | somewhat random order. That means that it is easy to run a "db_get" |
649 | request on thesa me database as a concurrent "db_close" request, leading |
649 | request on the same database as a concurrent "db_close" request, leading |
650 | to a crash, silent data corruption, eventually the next world war on |
650 | to a crash, silent data corruption, eventually the next world war on |
651 | terrorism. |
651 | terrorism. |
652 | |
652 | |
653 | If you only ever use foreground requests (without a callback), this will |
653 | If you only ever use foreground requests (without a callback), this will |
654 | not be an issue. |
654 | not be an issue (unless you use threads). |
655 | |
655 | |
656 | Unexpected Freezes or Deadlocks |
656 | Unexpected Freezes or Deadlocks |
657 | Remember that, by default, BDB will execute requests in parallel, which |
657 | Remember that, by default, BDB will execute requests in parallel, which |
658 | easily leads to deadlocks (even concurrent put's on the same database |
658 | easily leads to deadlocks (even concurrent put's on the same database |
659 | can deadlock). |
659 | can deadlock). |