mapbox / mapbox/dynamodb-replicator
incremental-snapshot creates extra output in snapshot
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 131
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
bin/incremental-snapshot.js s3://$BackupBucket/$BackupPrefix/$TABLE s3://$BackupBucket/${TABLE}-snapshot
sometimes this leaves empty lines in the snapshot output - for example:
aws s3 cp s3://$BackupBucket/${TABLE}-snapshot - | gzcat
{"what":{"S":"new1"},"a":{"S":"b"}}
{"what":{"S":"new2"},"a":{"S":"11"}}
{"what":{"S":"a"},"b":{"S":"ccd"}}
{"what":{"S":"test2"},"a":{"S":"asdf"}}
{"what":{"S":"new10"},"a":{"S":"b"}}
{"what":{"S":"sdfg"},"a":{"S":"asdf"}}
{"what":{"S":"asdf"},"aa":{"S":"bb"}}
{"what":{"S":"test"},"a":{"S":"test1"}}
{"what":{"S":"new"},"a":{"S":"fish faster 8"}}
{"what":{"S":"test4"}}
{"what":{"S":"b"},"a":{"S":"aa"},"b":{"S":"cc"}}
This one, anyway, is easy enough to handle during the uncompress ( | gzip | grep -v "^$) - but...
removed other case, found where that data came from and it was on me.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with bin/incremental-snapshot.js and reproduce the snapshot command against the S3 paths shown in the issue. Inspect the decompressed output for blank lines and trace how records are written; done means incremental snapshots contain no unintended empty lines.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, javascript
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100