Skip to content

Conversation

@wdberkeley
Copy link
Owner

This makes the reconciler commit objects to the metastore, and drives the LRO using the metastore's response.

There're still some rough parts, especially around topic id handling and errors, and it can't be well-tested until there's an L1 reader, and I need to (either here or in a follow-up) change LRO handling to use the ctp_stm.

So, for now, it's a draft.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v25.1.x
  • v24.3.x
  • v24.2.x

Release Notes

  • none

This alters the reconciler so it builds and uploads proper L1 objects,
using the l1::io and l1::object_builder abstractions.

A follow-up will change the commit and LRO offset portions of the
reconciler to use the metastore and the ctp_stm.
This prepares the reconciler to use the metastore to manager
L1 metadata.
The metastore speaks topic ID, so the reconciler needs to.
The metastore may partition objects into separate domains. The
reconciler must build objects according to this partitioning, so the
metastore metadata building process must be used to coordinate the
object building process.
This commits the objects to the metastore once they've been built and
uploaded.
This updates the LRO for partitions based on the metastore's response to
the add_objects call, which may contain correction to the LRO.
wdberkeley added a commit that referenced this pull request Sep 9, 2025
This change improves the handling of exceptions in the L1 reader in the
following ways:
1. It removes try-catch blocks in favor of ss::coroutine::as_future.
2. It ensures that object readers are closed even in exceptional
   situations (using #1).
@wdberkeley wdberkeley force-pushed the bob-the-l1-object-builder branch 2 times, most recently from 99aeb53 to 0723ccc Compare September 9, 2025 22:09
wdberkeley added a commit that referenced this pull request Sep 15, 2025
This change improves the handling of exceptions in the L1 reader in the
following ways:
1. It removes try-catch blocks in favor of ss::coroutine::as_future.
2. It ensures that object readers are closed even in exceptional
   situations (using #1).
wdberkeley pushed a commit that referenced this pull request Sep 16, 2025
`ct/l1`: add `meta` and `logger` [CT - Compaction #1]
wdberkeley pushed a commit that referenced this pull request Nov 11, 2025
Fix a leak when the keytab cannot be found.

```
Direct leak of 120 byte(s) in 3 object(s) allocated from:
    #0 0x58cc434ea154 in malloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:67:3
    #1 0x736a590858ad in krb5_build_principal_alloc_va ../../.././src/lib/krb5/krb/bld_princ.c:124:9
    #2 0x736a590858ad in krb5_build_principal ../../.././src/lib/krb5/krb/bld_princ.c:148:14
    redpanda-data#3 0x736a595ae86a in kg_acceptor_princ ../../.././src/lib/gssapi/krb5/naming_exts.c:165:12
    redpanda-data#4 0x736a59560092 in acquire_accept_cred ../../.././src/lib/gssapi/krb5/acquire_cred.c:199:16
    redpanda-data#5 0x736a59560092 in acquire_cred_context ../../.././src/lib/gssapi/krb5/acquire_cred.c:845:15
    redpanda-data#6 0x736a5955f43d in acquire_cred_from ../../.././src/lib/gssapi/krb5/acquire_cred.c:1320:11
    redpanda-data#7 0x736a5955ed49 in krb5_gss_acquire_cred_from ../../.././src/lib/gssapi/krb5/acquire_cred.c:1348:12
    redpanda-data#8 0x736a594fa4c4 in gss_add_cred_from ../../.././src/lib/gssapi/mechglue/g_acquire_cred.c:544:11
    redpanda-data#9 0x736a594f9361 in gss_acquire_cred_from ../../.././src/lib/gssapi/mechglue/g_acquire_cred.c:190:10
    redpanda-data#10 0x736a595cde33 in get_available_mechs ../../.././src/lib/gssapi/spnego/spnego_mech.c:3109:18
    redpanda-data#11 0x736a595cd788 in spnego_gss_acquire_cred_from ../../.././src/lib/gssapi/spnego/spnego_mech.c:377:11
    redpanda-data#12 0x736a594fa4c4 in gss_add_cred_from ../../.././src/lib/gssapi/mechglue/g_acquire_cred.c:544:11
    redpanda-data#13 0x736a594f9361 in gss_acquire_cred_from ../../.././src/lib/gssapi/mechglue/g_acquire_cred.c:190:10
    redpanda-data#14 0x58cc523cf7de in security::gssapi_authenticator::impl::init() src/v/security/gssapi_authenticator.cc:293:20
```

The associated log line is:
```
INFO  2025-11-10 12:29:46,682 security - gssapi_authenticator.cc:71 - GSS_API error gss init failed to acquire credentials for principal redpanda in keytab /var/lib/redpanda/redpanda.keytab: No credentials were supplied, or the credentials were unavailable or inaccessible
```

Signed-off-by: Ben Pope <[email protected]>
wdberkeley added a commit that referenced this pull request Nov 12, 2025
wdberkeley pushed a commit that referenced this pull request Dec 8, 2025
Fix a leak when the keytab cannot be found.

```
Direct leak of 120 byte(s) in 3 object(s) allocated from:
    #0 0x58cc434ea154 in malloc /src/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:67:3
    #1 0x736a590858ad in krb5_build_principal_alloc_va ../../.././src/lib/krb5/krb/bld_princ.c:124:9
    #2 0x736a590858ad in krb5_build_principal ../../.././src/lib/krb5/krb/bld_princ.c:148:14
    redpanda-data#3 0x736a595ae86a in kg_acceptor_princ ../../.././src/lib/gssapi/krb5/naming_exts.c:165:12
    redpanda-data#4 0x736a59560092 in acquire_accept_cred ../../.././src/lib/gssapi/krb5/acquire_cred.c:199:16
    redpanda-data#5 0x736a59560092 in acquire_cred_context ../../.././src/lib/gssapi/krb5/acquire_cred.c:845:15
    redpanda-data#6 0x736a5955f43d in acquire_cred_from ../../.././src/lib/gssapi/krb5/acquire_cred.c:1320:11
    redpanda-data#7 0x736a5955ed49 in krb5_gss_acquire_cred_from ../../.././src/lib/gssapi/krb5/acquire_cred.c:1348:12
    redpanda-data#8 0x736a594fa4c4 in gss_add_cred_from ../../.././src/lib/gssapi/mechglue/g_acquire_cred.c:544:11
    redpanda-data#9 0x736a594f9361 in gss_acquire_cred_from ../../.././src/lib/gssapi/mechglue/g_acquire_cred.c:190:10
    redpanda-data#10 0x736a595cde33 in get_available_mechs ../../.././src/lib/gssapi/spnego/spnego_mech.c:3109:18
    redpanda-data#11 0x736a595cd788 in spnego_gss_acquire_cred_from ../../.././src/lib/gssapi/spnego/spnego_mech.c:377:11
    redpanda-data#12 0x736a594fa4c4 in gss_add_cred_from ../../.././src/lib/gssapi/mechglue/g_acquire_cred.c:544:11
    redpanda-data#13 0x736a594f9361 in gss_acquire_cred_from ../../.././src/lib/gssapi/mechglue/g_acquire_cred.c:190:10
    redpanda-data#14 0x58cc523cf7de in security::gssapi_authenticator::impl::init() src/v/security/gssapi_authenticator.cc:293:20
```

The associated log line is:
```
INFO  2025-11-10 12:29:46,682 security - gssapi_authenticator.cc:71 - GSS_API error gss init failed to acquire credentials for principal redpanda in keytab /var/lib/redpanda/redpanda.keytab: No credentials were supplied, or the credentials were unavailable or inaccessible
```

Signed-off-by: Ben Pope <[email protected]>
(cherry picked from commit c6dec53)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants