Attention is currently required from: arehbein, dexter, pespin.
Patch set 3:Code-Review -1
2 comments:
File src/core/write_queue.c:
Patch Set #3, Line 161: queue->current_length > queue->max_length
This condition can never be true because you're updating the `queue->max_length` after the loop, not before. So now this function would not remove any items at all. Do you have a unit test for the scenario of removing exceeding items? Oh, you do. See my other comment then.
File tests/write_queue/wqueue_test.c:
Patch Set #3, Line 98: OSMO_ASSERT
Somehow this `assert()` does not assert at all, no matter how I change the expected value. This is weird. If I add a `printf()` here, I clearly see that the amount of dropped messages is 0, as expected with the current implementation (see my other comment).
Ah, well... I see now. You're doing `=` instead of `==`!
To view, visit change 34444. To unsubscribe, or for help writing mail filters, visit settings.