microsoft / microsoft/etcd3

Missing method to expose Campaign.keyRevision to SDK consumers

Open
#199 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
546
Forks
76
Avg merge
22h 46m
Merged PRs (30d)
13

Description

Hi, I was playing around with this SDK to help perform leader election & coordination for my own project. After a leader has been elected (through Election.campaign), I believe keyRevision of Campaign should be available for the client.

According to the concurrency API reference, when leaders write data to etcd, they should use the leader revision number to check if their leadership still holds, to help avoid split-brain situations.

rev is the creation revision of the key. It can be used to test for ownership of an election during transactions by testing the key’s creation revision matches rev

The Go client exposes the revision number in the Election struct. Currently, Campaign supports getCampaignKey, but there is no way to get the revision (other than something like (campaign as any).keyRevision).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Campaign implementation behind Election.campaign and its existing getCampaignKey support. Confirm how keyRevision is currently stored, then expose it to SDK consumers without a type cast; done when callers can read the campaign's revision through the public API.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
api
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.