solana/core
behzad nouri fa86a335b0
implements cursor for gossip crds table queries (#16952)
VersionedCrdsValue.insert_timestamp is used for fetching crds values
inserted since last query:
https://github.com/solana-labs/solana/blob/ec37a843a/core/src/cluster_info.rs#L1197-L1215
https://github.com/solana-labs/solana/blob/ec37a843a/core/src/cluster_info.rs#L1274-L1298

So it is crucial that insert_timestamp does not go backward in time when
new values are inserted into the table. However std::time::SystemTime is
not monotonic, or due to workload, lock contention, thread scheduling,
etc, ... new values may be inserted with a stalled timestamp way in the
past. Additionally, reading system time for the above purpose is
inefficient/unnecessary.

This commit adds an ordinal index to crds values indicating their insert
order. Additionally, it implements a new Cursor type for fetching values
inserted since last query.
2021-05-06 14:04:17 +00:00
..
benches removes delayed crds inserts when upserting gossip table (#16806) 2021-04-28 11:56:13 +00:00
src implements cursor for gossip crds table queries (#16952) 2021-05-06 14:04:17 +00:00
tests implements cursor for gossip crds table queries (#16952) 2021-05-06 14:04:17 +00:00
.gitignore
Cargo.toml retains crds values if the origin is still active (#16576) 2021-04-23 15:14:49 +00:00
build.rs Remove frozen ABI modules from solana-sdk 2020-10-20 16:11:30 -07:00