Skip to content

CNDB-17161: Add more logging to SAI initialization code#2282

Open
pkolaczk wants to merge 2 commits intocndb-main-release-202604from
more-index-build-logging
Open

CNDB-17161: Add more logging to SAI initialization code#2282
pkolaczk wants to merge 2 commits intocndb-main-release-202604from
more-index-build-logging

Conversation

@pkolaczk
Copy link
Copy Markdown

No description provided.

@github-actions
Copy link
Copy Markdown

Checklist before you submit for review

  • This PR adheres to the Definition of Done
  • Make sure there is a PR in the CNDB project updating the Converged Cassandra version
  • Use NoSpamLogger for log lines that may appear frequently in the logs
  • Verify test results on Butler
  • Test coverage for new/modified code is > 80%
  • Proper code formatting
  • Proper title for each commit staring with the project-issue number, like CNDB-1234
  • Each commit has a meaningful description
  • Each commit is not very long and contains related changes
  • Renames, moves and reformatting are in distinct commits
  • All new files should contain the DataStax copyright header instead of the Apache License one

{
try
{
logger.debug("IndexBuildDecider#onInitialBuild for index {} returned {}", index.getIndexMetadata().name, IndexBuildDecider.instance.onInitialBuild());
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe add the keyspace name too?

Suggested change
logger.debug("IndexBuildDecider#onInitialBuild for index {} returned {}", index.getIndexMetadata().name, IndexBuildDecider.instance.onInitialBuild());
logger.debug("IndexBuildDecider#onInitialBuild for index {}.{} returned {}",
keyspace, index.getIndexMetadata().name, IndexBuildDecider.instance.onInitialBuild());

// if there's no initialization, just mark as built (if it should be queryable) and return:
if (initialBuildTask == null)
{
logger.debug("No initialization task for index [{}], assuming index is built", index.getIndexMetadata().name);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe add the keyspace name too?

Suggested change
logger.debug("No initialization task for index [{}], assuming index is built", index.getIndexMetadata().name);
logger.debug("No initialization task for index [{}.{}], assuming index is built", keyspace.getName(), index.getIndexMetadata().name);

if (IndexBuildDecider.instance.isIndexQueryableAfterInitialBuild(baseCfs))
markIndexBuilt(index, true);
else
logger.debug("Not marking index [{}] as built because IndexBuildDecider#isIndexQueryableAfterInitialBuild returned false", index.getIndexMetadata().name);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
logger.debug("Not marking index [{}] as built because IndexBuildDecider#isIndexQueryableAfterInitialBuild returned false", index.getIndexMetadata().name);
logger.debug("Not marking index [{}.{}] as built because IndexBuildDecider#isIndexQueryableAfterInitialBuild returned false",
keyspace.getName(), index.getIndexMetadata().name);

@sonarqubecloud
Copy link
Copy Markdown

@cassci-bot
Copy link
Copy Markdown

@pkolaczk pkolaczk force-pushed the cndb-main-release-202604 branch from 7cc369f to 609f428 Compare April 1, 2026 13:36
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.

4 participants