grrolland / ngx-distributed-shm

Distributed SHM storage based on Hazelcast for NGinx.
GNU General Public License v3.0
19 stars 6 forks source link

fix(#30): INCR command TTL issue due to lastingTime/deadline calculation #31

Closed alexist closed 11 months ago

alexist commented 11 months ago

Fix #30

grrolland commented 11 months ago

Hi Alexis,

Could you :

Or (I prefer this) :

You should remove the .editorconfig from versionning.

Thanks for your PR !

alexist commented 11 months ago

Hi, in fact, I didn't change the semantic. Client send the timeout in seconds as usual, and the Command convert to milliseconds

   protected long getExpire(String commandToken) throws ProtocolException {
        try {
            final int expire = Integer.parseInt(commandToken);
            if (expire < 0) {
                throw new ProtocolException();
            }
            return expire * 1000L;
            ....
alexist commented 11 months ago

For the editorconfig, i will remove it. Editorconfig allow to share the formater config

grrolland commented 11 months ago

My bad, you are right.

I don't see this modification.

Concerning EditorConfig, I didn't know about this standard (now I do). You can keep it versioned.

I approve your PR.