Skip to content

out_s3: added blob handling feature #9907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
622d278
flb_blob_db: initial commit of the blob database component
leonardo-albertovich Feb 3, 2025
14476ba
signv4: added missing method support
leonardo-albertovich Feb 3, 2025
151a2cc
sqldb: added locking mechanics
leonardo-albertovich Feb 3, 2025
960f3e8
aws_util: added blob specific s3 key generation
leonardo-albertovich Feb 3, 2025
e73d42a
out_s3: added blob support
leonardo-albertovich Feb 3, 2025
dda8050
build: added blob database component
leonardo-albertovich Feb 3, 2025
285144c
out_s3: added missing windows header
leonardo-albertovich Feb 3, 2025
a768345
out_s3: added missing TLS initializer
leonardo-albertovich Feb 3, 2025
d083add
out_s3: removed erroneously included code (CID 532473)
leonardo-albertovich Feb 5, 2025
ca26268
out_s3: fixed potential memory leak (CID 532470)
leonardo-albertovich Feb 5, 2025
bde4f84
out_s3: fixed compiler warning (CID 532472)
leonardo-albertovich Feb 5, 2025
ff2ab43
out_s3: fixed compiler warning (CID 532471)
leonardo-albertovich Feb 5, 2025
87436be
out_s3: fixed NULL dereferences (CID 532469)
leonardo-albertovich Feb 5, 2025
52c2339
out_s3: fixed compiler warning (CID 532468)
leonardo-albertovich Feb 5, 2025
039bd43
out_s3: pre-signed url support addition
leonardo-albertovich Feb 18, 2025
493094c
flb_blob_db: code quality improvements
leonardo-albertovich Apr 24, 2025
405014d
in_blob: updated date
leonardo-albertovich Apr 24, 2025
2724474
out_s3: addressed review requests
leonardo-albertovich Apr 24, 2025
7cf4fcf
Merge branch 'master' into leonardo-master-s3-blob
edsiper Jun 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion include/fluent-bit/flb_aws_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,14 @@ int flb_aws_is_auth_error(char *payload, size_t payload_size);

int flb_read_file(const char *path, char **out_buf, size_t *out_size);

//* Constructs S3 object key as per the format. */
/* Constructs S3 object key as per the format. */
flb_sds_t flb_get_s3_key(const char *format, time_t time, const char *tag,
char *tag_delimiter, uint64_t seq_index);

/* Constructs S3 object key as per the blob format. */
flb_sds_t flb_get_s3_blob_key(const char *format, const char *tag,
char *tag_delimiter, const char *blob_path);

/*
* This function is an extension to strftime which can support milliseconds with %3N,
* support nanoseconds with %9N or %L. The return value is the length of formatted
Expand Down
454 changes: 454 additions & 0 deletions include/fluent-bit/flb_blob_db.h

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions include/fluent-bit/flb_sqldb.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <sqlite3.h>
#include <fluent-bit.h>
#include <fluent-bit/flb_lock.h>

struct flb_sqldb {
char *path; /* physical path of the database */
Expand All @@ -30,6 +31,7 @@ struct flb_sqldb {
int users; /* number of active users */
void *parent; /* if shared, ref to parent */
sqlite3 *handler; /* SQLite3 handler */
flb_lock_t lock; /* thread safety mechanism */
struct mk_list _head; /* Link to config->sqldb_list */
};

Expand All @@ -40,6 +42,11 @@ int flb_sqldb_close(struct flb_sqldb *db);
int flb_sqldb_query(struct flb_sqldb *db, const char *sql,
int (*callback) (void *, int, char **, char **),
void *data);

int64_t flb_sqldb_last_id(struct flb_sqldb *db);

int flb_sqldb_lock(struct flb_sqldb *db);

int flb_sqldb_unlock(struct flb_sqldb *db);

#endif
Loading
Loading