Sunday, 26 May 2024

DeltaQ.RTB - Update 20

There was a fundamental misunderstanding about how the B2 API handles file deletions (and file downloads, for that matter). In some cases, there are API endpoints that just randomly take a bucket name instead of a bucket id for no obvious reason. In the case of file deletions, if all you already have is the file's path, you need to look up the file id in order to submit a deletion request -- I assume this is to make sure you don't send deletions accidentally, a safeguard as it were. Because of this, the remote file state cache was failing to transfer and built up a considerable backlog. There is now (configurable) detailed debug logging from the remote file state cache, and based on that I was able to fix the broken B2 API operations. Between that and some other polishing, we're up to 10,600 lines of code now -- and the remote file state cache is now functioning as designed. The design of the delivery mechanism was such that it was robust to its own failure and no data was lost due to the bug -- it was just delayed, but that is now being rectified. 🙂

Stats:

  • Current line count: 10,600
  • Tests: 123

1 comment:

  1. I did some more comprehensive digging and found some classes not using the centralized output pattern – and thus not respecting the mutex. It was my bug after all 🙂 Fixed now.

    Line count: 10,645
    [This comment was originally written on Facebook on May 26 at 11:35 PM.]

    ReplyDelete