- Please start your sentences with an uppercase letter
- Please don’t edit the generated git messages
- Please don’t write “Revert” or “Merge” when you’re not using
git revert
nor git merge
# GitHub
Fix issue #123
# JIRA
[JIRA-1234] Fix a problem with the route system when...
Capitalized, short (50 chars or less) summary
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body. The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.
Write your commit message in the imperative: "Fix bug" and not "Fixed bug"
or "Fixes bug." This convention matches up with commit messages generated
by commands like git merge and git revert.
Further paragraphs come after blank lines.
- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet, followed by a
single space, with blank lines in between, but conventions vary here
- Use a hanging indent
Let’s start with a few of the re
Summarize changes in around 50 characters or less
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of the commit and the rest of the text as the body. The
blank line separating the summary from the body is critical (unless
you omit the body entirely); various tools like `log`, `shortlog`
and `rebase` can get confused if you run the two together.
Explain the problem that this commit is solving. Focus on why you
are making this change as opposed to how (the code explains that).
Are there side effects or other unintuitive consequences of this
change? Here's the place to explain them.
Further paragraphs come after blank lines.
- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet, preceded
by a single space, with blank lines in between, but conventions
vary here
If you use an issue tracker, put references to them at the bottom,
like this:
Resolves: #123
See also: #456, #789
Make the cached role coherrent with the actual one
When observing the leader running a master role, set the cached role
stored in the state_handler to master as well. Failure to do so
resulted in the manually promoted node to continue running with a
cached 'replica' role. This led to the failure to create replication
slots for the new replicas.
We could do it conditionally, but both reading and writing the role
require the same lock, and the unconditional approach makes the unit tests simpler.
Fix rewind behavior when paused
* Check if we can rewind when deciding to call Postgresql.follow during pause.
Without this the following sequence of events occurs:
1. Manual failover from node, demotion sets need_rewind flag. Rewind is not done because can_rewind is False.
2. Cluster is put into paused mode. Rewind is not attempted because recovery.conf matches.
3. PostgreSQL goes down (pg_ctl stop).
4. Because need_rewind is set PostgreSQL is restarted.
5. Sysadmin is unhappy because Patroni is doing stuff behind his back during pause.
* Allow superuser user to be missing from config for rewind.
In other places a missing superuser authentication section is allowed and we default to libpq's use default OS user with no password. This makes rewind work with a missing superuser configuration.
---
Issue: [#365](https://link/to/issue/365)
Make Source.indexOf(ByteString) significantly faster
Previously the algorithm that did this was extremely inefficient, and had worst case runtime of O(N * S * S) for N is size of the bytestring and S is the number of segments.
The new code runs in O(N * S). It accomplishes this by not starting each search at the first segment, which could occur many times when called by RealBufferedSource.
Convert specs to RSpec 3.1.7 syntax with Transpec
This conversion is done by Transpec 2.3.8 with the following command:
transpec
* 46 conversions
from: it { should ... }
to: it { is_expected.to ... }
* 7 conversions
from: it { should_not ... }
to: it { is_expected.not_to ... }
* 2 conversions
from: it { should have(n).items }
to: it 'has n dependencies' do expect(subject.size).to eq(n) end
* 2 conversions
from: obj.should
to: expect(obj).to
* 2 conversions
from: obj.stub(:message)
to: allow(obj).to receive(:message)
* 1 conversion
from: == expected
to: eq(expected)
* 1 conversion
from: it { should have(n).items }
to: it 'has n feature' do expect(subject.size).to eq(n) end
* 1 conversion
from: it { should have(n).items }
to: it 'has n features' do expect(subject.size).to eq(n) end
* 1 conversion
from: it { should have(n).items }
to: it 'has n files' do expect(subject.size).to eq(n) end
For more details:
https://github.com/yujinakayama/transpec#supported-conversions