)]}'
{
  "commit": "cff12ead95470bff0cc5fd9cb429b814af4b4d21",
  "tree": "64027844cece5325c994578693cd5309352bda20",
  "parents": [
    "c88d57e1765d8bf42aac3b56621e6750cad91d3a"
  ],
  "author": {
    "name": "Matteo Merli",
    "email": "mmerli@apache.org",
    "time": "Tue Jan 31 17:56:41 2023 -0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Feb 01 09:56:41 2023 +0800"
  },
  "message": "Fixed deadlock in producer.send_async (#87)\n\nFix #84\r\n\r\nRelease the GIL while calling `producer.sendAsync()` to avoid a deadlock when PyBind is triggering the Python callback. \r\n\r\n\r\n  * Main Thread \r\n     1. Holds the Python GIL\r\n     2. Call `producer.send_async()`\r\n     3. Tries to acquire internal `ClientConnetion` lock\r\n\r\n * Pulsar client internal thread\r\n     1. Holds lock on `ClientConnection`\r\n     2. Receives ack from the broker\r\n     3. Triggers callback\r\n     4. PyBind11 acquires GIL \u003c---- Deadlock\r\n\r\nThe problem is the different behavior in PyBind from Boost::Python. \r\n\r\nWe always need to make sure we release the GIL before making any call to C++ that potentially acquires any mutexes\r\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a77bb50b525b7657097921bcb9a9f42fbbf0ad84",
      "old_mode": 33188,
      "old_path": "src/consumer.cc",
      "new_id": "972bd0bfe24bceeb9d9dae3ca569e8cc966b51eb",
      "new_mode": 33188,
      "new_path": "src/consumer.cc"
    },
    {
      "type": "modify",
      "old_id": "bba262af204b7f06a366830e05b3372aa063fcb9",
      "old_mode": 33188,
      "old_path": "src/producer.cc",
      "new_id": "1dd5a76104e6772ca598300fd7a00ed0982f9218",
      "new_mode": 33188,
      "new_path": "src/producer.cc"
    },
    {
      "type": "modify",
      "old_id": "feba877d7c48936def63053700d4c1450df550a4",
      "old_mode": 33261,
      "old_path": "tests/pulsar_test.py",
      "new_id": "00e24666a0e3e0459b36eae6d18d7ba6dcad5f45",
      "new_mode": 33261,
      "new_path": "tests/pulsar_test.py"
    }
  ]
}
