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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,12 @@ psql -h localhost -p 55432 -U postgres
./cluster down all
```

## Quick Start: Production Deployment

In a production deployment, each Springtail host runs a `coordinator` process that supervises the daemons for one service tier (`ingestion`, `fdw`, or `proxy`), installs binaries from S3, monitors component liveness via Redis, and reacts to lifecycle state changes (startup, reload, drain, shutdown) driven by the controller.

For details on starting Springtail, adding replica (FDW) nodes, removing replica nodes, and stopping Springtail, see [`python/coordinator/README.md`](python/coordinator/README.md).

## License

This project is licensed under the Elastic License 2.0 (ELv2).
Expand Down
13 changes: 11 additions & 2 deletions include/sys_tbl_mgr/table.hh
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ namespace indexer_helpers {
const Tracker& tb = b;

if (ta == tb) {
// Vacant table: both trackers carry null btrees; nothing more to compare.
if (a._btree == nullptr) {
return true;
}
return (a._btree_i == a._btree->end() || a._page_i == b._page_i);
}
return false;
Expand Down Expand Up @@ -496,8 +500,8 @@ namespace indexer_helpers {
*/
Iterator end(uint64_t index_id = constant::INDEX_PRIMARY, bool index_only = false)
{
// check for vacant table
if (index_id == constant::INDEX_PRIMARY && _primary_index == nullptr) {
// check for vacant table - return a vacant iterator regardless of index type
if (_primary_index == nullptr) {
return Iterator(this);
}
return Iterator(this, index_id, index_only);
Expand All @@ -512,6 +516,11 @@ namespace indexer_helpers {
if (idx == 0) {
return _primary_index;
}
// Vacant table: _secondary_indexes is empty; return null instead of throwing,
// matching the primary-index behavior on a vacant table.
if (_primary_index == nullptr) {
return nullptr;
}
return _secondary_indexes.at(idx).first;
}

Expand Down
Loading