Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .unreleased/pr_8434
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixes: #8434 Allow show_chunks to process more than 65535 chunks
6 changes: 3 additions & 3 deletions src/chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static void chunk_scan_ctx_init(ChunkScanCtx *ctx, const Hypertable *ht, const P
static void chunk_scan_ctx_destroy(ChunkScanCtx *ctx);
static void chunk_collision_scan(ChunkScanCtx *scanctx, const Hypercube *cube);
static int chunk_scan_ctx_foreach_chunk_stub(ChunkScanCtx *ctx, on_chunk_stub_func on_chunk,
uint16 limit);
uint64 limit);
static Datum show_chunks_return_srf(FunctionCallInfo fcinfo);
static int chunk_cmp(const void *ch1, const void *ch2);
static int chunk_point_find_chunk_id(const Hypertable *ht, const Point *p);
Expand Down Expand Up @@ -1791,7 +1791,7 @@ chunk_collision_scan(ChunkScanCtx *scanctx, const Hypercube *cube)
* Returns the number of processed chunks.
*/
static int
chunk_scan_ctx_foreach_chunk_stub(ChunkScanCtx *ctx, on_chunk_stub_func on_chunk, uint16 limit)
chunk_scan_ctx_foreach_chunk_stub(ChunkScanCtx *ctx, on_chunk_stub_func on_chunk, uint64 limit)
{
HASH_SEQ_STATUS status;
ChunkScanEntry *entry;
Expand Down Expand Up @@ -2274,7 +2274,7 @@ get_chunks_in_time_range(Hypertable *ht, int64 older_than, int64 newer_than, Mem

/* Get all the chunks from the context */
chunk_scan_ctx.data = &data;
chunk_scan_ctx_foreach_chunk_stub(&chunk_scan_ctx, chunk_scan_context_add_chunk, -1);
chunk_scan_ctx_foreach_chunk_stub(&chunk_scan_ctx, chunk_scan_context_add_chunk, 0);
/*
* only affects ctx.htab Got all the chunk already so can now safely
* destroy the context
Expand Down
2 changes: 1 addition & 1 deletion src/chunk.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ typedef struct ChunkScanCtx
const Hypertable *ht;
const Point *point;
unsigned int num_complete_chunks;
int num_processed;
uint64 num_processed;
bool early_abort;
LOCKMODE lockmode;

Expand Down
Loading