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

share / sharedb / 949
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 24s
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
949

push

travis-ci

Alec Gibson
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.

1147 of 1371 branches covered (83.66%)

2439 of 2545 relevant lines covered (95.83%)

441.59 hits per line

Jobs
ID Job ID Ran Files Coverage
1 949.1 03 Dec 2018 03:10PM UTC 0
95.83
Travis Job 949.1
2 949.2 03 Dec 2018 03:10PM UTC 0
95.83
Travis Job 949.2
3 949.3 03 Dec 2018 03:10PM UTC 0
95.83
Travis Job 949.3
Source Files on build 949
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #949
  • 513f6b65 on github
  • Prev Build on snapshot-by-timestamp (#945)
  • Next Build on snapshot-by-timestamp (#951)
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