Skip to content

Comments

do not use msgpack in ingest_dynamodb for now#40

Closed
jordane wants to merge 2 commits intomainfrom
jme/LFXV2-1094
Closed

do not use msgpack in ingest_dynamodb for now#40
jordane wants to merge 2 commits intomainfrom
jme/LFXV2-1094

Conversation

@jordane
Copy link
Member

@jordane jordane commented Feb 19, 2026

No description provided.

Signed-off-by: Jordan Evans <jevans@linuxfoundation.org>
@jordane jordane requested a review from emsearcy as a code owner February 19, 2026 19:45
Copilot AI review requested due to automatic review settings February 19, 2026 19:45
@jordane jordane requested a review from a team as a code owner February 19, 2026 19:45
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes MessagePack (msgpack) encoding support from DynamoDB stream ingestion, standardizing on JSON-only encoding for this specific ingestion path. The change is temporary ("for now" per the title) and affects how DynamoDB stream events are stored in the NATS KV bucket.

Changes:

  • Removed msgpack import from ingest_dynamodb.go
  • Removed msgpack fallback when unmarshaling existing KV entries (previously tried msgpack if JSON failed)
  • Removed conditional encoding logic that respected cfg.UseMsgpack, now always uses JSON for marshaling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 119 to 122
if unmarshalErr := json.Unmarshal(existing.Value(), &existingData); unmarshalErr != nil {
if msgpackErr := msgpack.Unmarshal(existing.Value(), &existingData); msgpackErr != nil {
logger.With(errKey, unmarshalErr, "msgpack_error", msgpackErr, "key", key).
ErrorContext(ctx, "failed to unmarshal existing KV entry")
logger.With(errKey, unmarshalErr, "key", key).ErrorContext(ctx, "failed to unmarshal existing KV entry")
return false
}
}
Copy link

Copilot AI Feb 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code now always uses JSON encoding for DynamoDB events. However, if any existing KV entries were previously stored in msgpack format (when cfg.UseMsgpack was true), this code will now fail to unmarshal them since the msgpack fallback has been removed. Consider documenting this breaking change or adding a migration path if there's existing msgpack-encoded data in the v1-objects KV bucket from DynamoDB sources.

Copilot uses AI. Check for mistakes.
@emsearcy
Copy link
Contributor

This can be closed in favor of #42

@emsearcy emsearcy closed this Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants