tristanls / dynamodb-lock-client

A general purpose distributed locking library built for AWS DynamoDB.
MIT License
50 stars 19 forks source link

Add optional rangeKey support #25

Closed jepetko closed 4 years ago

jepetko commented 4 years ago

add optional rangeKey support so that the locking can be used like this:

            failOpenClient.acquireLock([LOCK_ID, SUB_LOCK_ID], (error, lock) => {
                if (error) {
                    reject(error);
                } else {
                    console.log(`acquired open lock with fencing token ${lock.fencingToken}`);
                    lock.on('error', () => console.error('failed to heartbeat!'));
                    resolve(lock);
                }
            });

where

jepetko commented 4 years ago

@tristanls I implemented support for range key and would like to push into a branch and create PR. However, if I try to do it, I'm receiving 403:

remote: Permission to tristanls/dynamodb-lock-client.git denied to jepetko.
fatal: unable to access 'https://jepetko@github.com/tristanls/dynamodb-lock-client.git/': The requested URL returned error: 403

Do you have to grant me some permissions to do so? Thank you.

tristanls commented 4 years ago

Permission to push a branch is not required for pull requests. A workflow I am familiar with would be to fork the repository, work against the fork, and then create a pull request from your fork.

Could you also share with me the use case for using the range key?

On Fri, Feb 21, 2020, 12:11 K. Golbang notifications@github.com wrote:

@tristanls https://github.com/tristanls I implemented support for range key and would like to push into a branch and create PR. However, if I try to do it, I'm receiving 403:

remote: Permission to tristanls/dynamodb-lock-client.git denied to jepetko. fatal: unable to access 'https://jepetko@github.com/tristanls/dynamodb-lock-client.git/': The requested URL returned error: 403

Do you have to grant me some permissions to do so? Thank you.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tristanls/dynamodb-lock-client/issues/25?email_source=notifications&email_token=AAFSMEBSFA4EYM67KMRUVLTREAKNFA5CNFSM4KZHQTQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMTSVHI#issuecomment-589769373, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFSMEC23VPFDQWFWPAUZT3REAKNFANCNFSM4KZHQTQA .

jepetko commented 4 years ago

Hi @tristanls , I created a PR #26 . Please, review it as soon as possible. Thank you.

tristanls commented 4 years ago

Released 0.7.1 with sort key (range key) support.