Commit Graph

10 Commits

Author SHA1 Message Date
Pekka Enberg
38a54df863 Fix pre-ScyllaDB copyright statements
People keep tripping over the old copyrights and copy-pasting them to
new files. Search and replace "Cloudius Systems" with "ScyllaDB".

Message-Id: <1460013664-25966-1-git-send-email-penberg@scylladb.com>
2016-04-08 08:12:47 +03:00
Avi Kivity
d5cf0fb2b1 Add license notices 2015-09-20 10:43:39 +03:00
Paweł Dziepak
b211bfa514 gc_clock: support adding an offset to the current time
This, intended for tests, feature allows testing time related event without
need for real time waits.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-02 17:26:22 +02:00
Tomasz Grabiec
b1e45e4401 db: Store ttl in atomic_cell
Origin does that, so should we. Both ttl and expiry time are stored in
sstables. The value of ttl seems to be used to calculate the read
digest (expiry is not used for that).

The API for creating atomic_cells changed a bit.

To create a non-expiring cell:

  atomic_cell::make_live(timestamp, value);

To create an expiring cell:

  atomic_cell::make_live(timestamp, value, expiry, ttl);

or:

  // Expiry is calculated based on current clock reading
  atomic_cell::make_live(timestamp, value, ttl_optional);
2015-05-06 19:42:38 +02:00
Tomasz Grabiec
5ba1486ae7 db: Rename "ttl" to "expiry" when it's used as time point
To avoid confusion with "ttl" the duration.
2015-05-06 17:27:22 +02:00
Tomasz Grabiec
d6a003dc59 gc_clock: Store max_ttl as duration rather than time_point
Extra wrapping in time_point has no point.
2015-05-06 17:22:35 +02:00
Tomasz Grabiec
744d75e7f8 db: Move max_ttl from db/expiring_cell.hh to gc_clock.hh 2015-04-17 15:08:06 +02:00
Tomasz Grabiec
c76e0ee4cd db_clock: Add conversion function from db_clock to gc_clock 2015-03-11 14:56:10 +01:00
Avi Kivity
6d18aa8f20 Decompose database.hh, types.hh into smaller headers
Avoid include hell for new code.
2015-03-04 16:18:48 +02:00
Tomasz Grabiec
8c63459b3b Introduce GC clock
The clock used to expire tombstones and cells with time-to-live.

Origin uses 32-bit precision for this clock counting seconds since the
epoch. This means the clock will overflow not that far in the future,
but if we want to maintain compatibility on sstable level we need to
follow that.
2015-01-23 18:45:27 +01:00