Commit Graph

3665 Commits

Author SHA1 Message Date
Joonas Koivunen
e6378197a7 timeline: drop 2 indentation from get_reconstruct_value 2023-08-28 12:42:28 +03:00
Joonas Koivunen
4bb0cc2fe4 gc: reflect LayerE now managing remote client 2023-08-28 12:42:28 +03:00
Joonas Koivunen
9304f42ea5 tenant: remove unused imports 2023-08-28 12:42:28 +03:00
Joonas Koivunen
18f4eb2622 timeline: remove compare_arced_layers 2023-08-28 12:42:28 +03:00
Joonas Koivunen
2caa8bcc23 layer_manager: more clippy 2023-08-28 12:42:28 +03:00
Joonas Koivunen
bb222abde1 layer_manager: remove metrics, dependend by gc/compaction 2023-08-28 12:42:28 +03:00
Joonas Koivunen
dd2b4ad26f layer_manager: cleanup unused 2023-08-28 12:42:28 +03:00
Joonas Koivunen
b65cb8ea05 storage_layer: we no longer clone for residency change 2023-08-28 12:42:28 +03:00
Joonas Koivunen
3a7efc10a0 timeline: cleanup unused imports 2023-08-28 12:42:28 +03:00
Joonas Koivunen
a682de1dba Timeline: get_value_reconstruct_data: avoid warnings 2023-08-28 12:42:28 +03:00
Joonas Koivunen
45a542c335 tenant: pub(crate) 2023-08-28 12:42:28 +03:00
Joonas Koivunen
bdb98b288e ==== reprocessed 2023-08-28 12:42:28 +03:00
Joonas Koivunen
a06c8e9add inmemory_layer: drop impl Layer 2023-08-28 12:42:28 +03:00
Joonas Koivunen
18eefd61eb inmemory_layer: less warnings 2023-08-28 12:42:28 +03:00
Joonas Koivunen
a2de0574b5 inmemorylayer: flush integration, partial? 2023-08-28 12:42:28 +03:00
Joonas Koivunen
aa8e954197 layer_manager, layer_access_stats: remove witness sidequest
it was interfering with me moving responsibilities back and forth
2023-08-28 12:42:28 +03:00
Joonas Koivunen
30847e59b9 remove remote_layer instead of keep fixing 2023-08-28 12:42:28 +03:00
Joonas Koivunen
d930a581f8 layer_manager: compaction changes 2023-08-28 12:42:28 +03:00
Joonas Koivunen
931c22545b compaction: clippies 2023-08-28 12:42:28 +03:00
Joonas Koivunen
366f3c8ff8 compaction: reflect LayerE now managing remote client 2023-08-28 12:42:28 +03:00
Joonas Koivunen
26c39d7b4c timeline: pub(crate) compaction 2023-08-28 12:42:28 +03:00
Joonas Koivunen
6ffa5138ce compaction: upload index on success
otherwise test_gc_of_remote_layers fails
2023-08-28 12:42:28 +03:00
Joonas Koivunen
975e1558cc compaction: integration 2023-08-28 12:42:28 +03:00
Joonas Koivunen
82a955ebfe layer_manager: resident layer flush l0 changes 2023-08-28 12:42:28 +03:00
Joonas Koivunen
82596f8807 delta_layer: reflect non-async LayerE::for_written 2023-08-28 12:42:28 +03:00
Joonas Koivunen
e3e57579a1 integrate: download_all_layers
this time around with graceful cancellation.
2023-08-28 12:42:28 +03:00
Joonas Koivunen
56d551e6a3 ==== reprocessed 2023-08-28 12:42:28 +03:00
Joonas Koivunen
b4a0f8baf7 integrate: Timeline::get_value_reconstruct_data 2023-08-28 12:42:28 +03:00
Joonas Koivunen
2e686ed6ea eviction: integration
- evictiontask: remove unused imports
- eviction_task and dube: cleanup
- timeline: pub(crate) eviction
- timeline: adjust to "layere: adjust eviction"
- test: remove layer_eviction_aba_fails because it can no longer happen
- test: fix up evicts later test with ability to await for eviction
- eviction_task: more unused imports
- eviction: clippy
- eviction_task: more clippy
- fixup eviction: docs
- eviction: hold only Arc<Layer> after checking downloadedness
- refactor earlier eviction: use drop_eviction_guard instead
- dube: evict in spawned tasks
- timeline, eviction: evict in spawned
- eviction: add more errors
- evict_layers: remove witness
- eviction: post-witness forgotten panic
- eviction: remove blog references
2023-08-28 12:42:28 +03:00
Joonas Koivunen
c46f72d411 create_image_layers integration (multifile) 2023-08-28 12:42:28 +03:00
Joonas Koivunen
ed46713e5c remote_timeline_client: pub(crate) on upload 2023-08-28 12:42:28 +03:00
Joonas Koivunen
c228cb7b3f remote_timeline_client: continued integration work post ResidentLayer 2023-08-28 12:42:28 +03:00
Joonas Koivunen
c88e4a0974 layer_manager: integration 2023-08-28 12:42:28 +03:00
Joonas Koivunen
b71a2f4cb2 load_layer_map: integration 2023-08-28 12:42:23 +03:00
Joonas Koivunen
98a7b090de ========= layere 2023-08-28 12:41:31 +03:00
Joonas Koivunen
235a8cbd28 wip: LayerE 2023-08-28 12:41:31 +03:00
Joonas Koivunen
6afeb3c6f7 ========= unrelated 2023-08-28 12:41:31 +03:00
Joonas Koivunen
8c42aeac9f test: move log to assert message 2023-08-28 12:41:31 +03:00
Joonas Koivunen
f36658ac10 layerdesc: add from_filename 2023-08-28 12:41:31 +03:00
Joonas Koivunen
f8227da9da unrelated: layer_manager: avoid arc cloning 2023-08-28 12:41:31 +03:00
Joonas Koivunen
fbcd174489 load_layer_map: schedule deletions for any future layers (#5103)
Unrelated fixes noticed while integrating #4938.

- Stop leaking future layers in remote storage
- We schedule extra index_part uploads if layer name to be removed was
not actually present
2023-08-28 10:51:49 +03:00
Felix Prasanna
7b5489a0bb compute_ctl: start pg in cgroup for vms (#4920)
Starts `postgres` in cgroup directly from `compute_ctl` instead of from
`vm-builder`. This is required because the `vm-monitor` cannot be in the
cgroup it is managing. Otherwise, it itself would be frozen when
freezing the cgroup.

Requires https://github.com/neondatabase/cloud/pull/6331, which adds the
`AUTOSCALING` environment variable letting `compute_ctl` know to start
`postgres` in the cgroup.

Requires https://github.com/neondatabase/autoscaling/pull/468, which
prevents `vm-builder` from starting the monitor and putting postgres in
a cgroup. This will require a `VM_BUILDER_VERSION` bump.
2023-08-25 15:59:12 -04:00
Felix Prasanna
40268dcd8d monitor: fix filecache calculations (#5112)
## Problem
An underflow bug in the filecache calculations.

## Summary of changes
Fixed the bug, cleaned up calculations in general.
2023-08-25 13:29:10 -04:00
Vadim Kharitonov
4436c84751 Change codeowners (#5109) 2023-08-25 19:48:16 +03:00
John Spray
b758bf47ca pageserver: refactor TimelineMetadata serialization in IndexPart (#5091)
## Problem

The `metadata_bytes` field of IndexPart required explicit
deserialization & error checking everywhere it was used -- there isn't
anything special about this structure that should prevent it from being
serialized & deserialized along with the rest of the structure.

## Summary of changes

- Implement Serialize and Deserialize for TimelineMetadata
- Replace IndexPart::metadata_bytes with a simpler `metadata`, that can
be used directly.

---------

Co-authored-by: Arpad Müller <arpad-m@users.noreply.github.com>
2023-08-25 16:16:20 +01:00
Felix Prasanna
024e306f73 monitor: improve logging (#5099) 2023-08-25 10:09:53 -04:00
Alek Westover
f71c82e5de remove obsolete need dependency (#5087) 2023-08-25 09:10:26 -04:00
Conrad Ludgate
faf070f288 proxy: dont return connection pending (#5107)
## Problem

We were returning Pending when a connection had a notice/notification
(introduced recently in #5020). When returning pending, the runtime
assumes you will call `cx.waker().wake()` in order to continue
processing.

We weren't doing that, so the connection task would get stuck

## Summary of changes

Don't return pending. Loop instead
2023-08-25 15:08:45 +03:00
Arpad Müller
8c13296add Remove BlockReader::read_blk in favour of BlockCursor (#5015)
## Problem

We want to make `read_blk` an async function, but outside of
`async_trait`, which allocates, and nightly features, we can't use async
fn's in traits.

## Summary of changes

* Remove all uses of `BlockReader::read_blk` in favour of using block
  cursors, at least where the type of the `BlockReader` is behind a
  generic
* Introduce a `BlockReaderRef` enum that lists all implementors of
  `BlockReader::read_blk`.
* Remove `BlockReader::read_blk` and move its implementations into
  inherent functions on the types instead.

We don't turn `read_blk` into an async fn yet, for that we also need to
modify the page cache. So this is a preparatory PR, albeit an important
one.

Part of #4743.
2023-08-25 12:28:01 +02:00
Felix Prasanna
18537be298 monitor: listen on correct port to accept agent connections (#5100)
## Problem
The previous arguments have the monitor listen on `localhost`, which the
informant can connect to since it's also in the VM, but which the agent
cannot. Also, the port is wrong.

## Summary of changes
Listen on `0.0.0.0:10301`
2023-08-24 17:32:46 -04:00