Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

postgres/tailer: data change row detection fixed #456

Merged
merged 2 commits into from
Mar 13, 2018

Conversation

erft-engineering
Copy link
Contributor

When you have newlines in database fields, the postgres tailer will not work.
This is due to the regular expression that is used to detect change rows in the data from the used
replication slot .

The regular expression uses the dot-directive which does not consume newlines by default. This issues the newline problem. With this slightly modified regular expression, the problem can be solved.

The regular expression for detecting data change rows could not handle newlines
in data fields correctly. The reason was, that the dot-directive in golang does
not consume newlines by default. With the regexp option (?s) this is fixed now.
@codecov
Copy link

codecov bot commented Feb 12, 2018

Codecov Report

Merging #456 into master will decrease coverage by 0.22%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #456      +/-   ##
==========================================
- Coverage   86.36%   86.14%   -0.23%     
==========================================
  Files          61       61              
  Lines        3587     3587              
==========================================
- Hits         3098     3090       -8     
- Misses        320      327       +7     
- Partials      169      170       +1
Impacted Files Coverage Δ
adaptor/postgres/tailer.go 82.12% <100%> (ø) ⬆️
adaptor/elasticsearch/clients/v2/writer.go 75.94% <0%> (-10.13%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b69a5b0...5233991. Read the comment docs.

@jipperinbham
Copy link
Contributor

only lint failures for other adaptors, will clean those up soon.

@jipperinbham jipperinbham merged commit a9a9c50 into compose:master Mar 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants