• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

share / sharedb / 950
96%
master: 97%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/actions/checkout-6
DEFAULT BRANCH: master
Ran 03 Dec 2018 03:10PM UTC
Jobs 3
Files 28
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
950

Pull #262

travis-ci

web-flow
Fetch snapshot by time

This change adds the ability fetch a snapshot by time. The motivation
for this is that fetching a document by time is quite a "natural" way
to think about document history, and allows us to - for example - fetch
multiple documents as they were at a given time, without having to
look up their exact version numbers first.

We add a new `Connection.fetchSnapshotByTimestamp` method, which
follows a very similar route to `Connection.fetchSnapshot`, and where
possible, as much code is re-used as possible:

  - both methods use a subclassed child of `SnapshotRequest`
  - both methods have their requests handled by the same machinery in
    `Connection`
  - both methods in the `Backend` have ops applied by a common method,
    but use their own methods for calls to middleware

In order to make this feature possible at scale, this change also adds
two new methods to the `MilestoneDB` interface:

  - `getMilestoneSnapshotAtOrBeforeTime`
  - `getMilestoneSnapshotAtOrAfterTime`

These methods are used to fetch milestone snapshots either side of the
requested timestamp, which means we only need to fetch the ops between
the two of them to reach the desired timestamp.

In the case where a milestone database is not being used, then fetching
a snapshot by timestamp is still possible, but it will fetch all the ops
for a document, and keep applying them from v0 until the timestamp is
reached, which is not particularly scalable.
Pull Request #262: Fetch snapshot by time

1147 of 1371 branches covered (83.66%)

168 of 168 new or added lines in 10 files covered. (100.0%)

2439 of 2545 relevant lines covered (95.83%)

441.59 hits per line

Jobs
ID Job ID Ran Files Coverage
1 950.1 03 Dec 2018 03:10PM UTC 0
95.83
Travis Job 950.1
2 950.2 03 Dec 2018 03:12PM UTC 0
95.83
Travis Job 950.2
3 950.3 03 Dec 2018 03:11PM UTC 0
95.83
Travis Job 950.3
Source Files on build 950
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #950
  • Pull Request #262
  • PR Base - master (#943)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc