Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go through all the open issues and PRs and apply their changes #27

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

vedang
Copy link

@vedang vedang commented May 2, 2023

This PR (and the master branch on my fork) contains (almost) all the fixes contributed by different members of the community. The only PR I haven't picked is #19 , since I am not sure that we should drop data that we have previously persisted to disk.

I've written the commit messages such that they capture the summary of all related conversations and will update all the linked issues / PRs if the commits are merged in.

Personally, my goal is as follows:

  1. Merge all the pending fixes into the code (this PR)
  2. Move the code from it's current project.clj based avatar to a deps.edn based layout under org.clj-commons/durable-queue.
  3. Update all the dependencies to the latest version.

I will do this on my personal fork of the project and contribute it back here. Hopefully one of the maintainers can help me with a review and merge the changes in. I am using durable-queue on a new project and since I'm reading through the code anyway I thought I might as well update the code.

markbastian and others added 4 commits May 2, 2023 10:57
Fixes Java 13+ compatiblity issues, as noted in
clj-commons#23. Copying the relevant parts from the
Issue:

   `java.nio.ByteBuffer` and the other buffer types in `java.nio` now
   define absolute bulk `get` and `put` methods to transfer contiguous
   sequences of bytes without regard to or effect on the buffer
   position.

Due to this, running durable-queue against Java 13+ leads to the
following error:

   No matching method put found taking 2 args for class
   `java.nio.DirectByteBuffer`

This commit fixes the problem by adding the relevant type-hints

Author: Mark Bastian
Ref:    https://github.com/markbastian/durable-queue
Closes: clj-commons#23
Closes: clj-commons#24
System/currentTimeMillis is not guaranteed to progress monotonically.
NTP shifts, leap seconds, and manual system time changes can all cause
elapsed time calculations to be incorrect if you use
currentTimeMillis.

nanoTime is always calculated against a fixed point and proceeds
monotonically.

https://go.googlesource.com/proposal/+/master/design/12914-monotonic.md
has a good discussion on monotonic time.

Closes: clj-commons#21
The README contains documentation for these parameters, this commit
copies them from the README into the docstring.

Closes: clj-commons#20
This function lets the client delete an individual named queue. It is
useful for deleting corrupted queue files (such as that get created
when the disk fills up).

Closes: clj-commons#17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants