Skip to content

Send identity when querying comdb2db too - #6061

Merged
mohitkhullar merged 1 commit into
bloomberg:mainfrom
mohitkhullar:send-identity-to-comdb2db
Oct 23, 2026
Merged

mohitkhullar merged 1 commit into
bloomberg:mainfrom
mohitkhullar:send-identity-to-comdb2db

Conversation

@mohitkhullar

@mohitkhullar mohitkhullar commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor
Call site hndl arg Identity before Identity after
begin real handle yes yes
query send real handle yes yes
cdb2_run_statement_typed_int real handle yes yes
comdb2db_get_dbhosts (discovery) NULL no yes

@roborivers roborivers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cbuild submission: Success ✓.
Regression testing: Success ✓.

The first 10 failing tests are:
sc_resume_logicalsc_generated **quarantined**
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**

@roborivers roborivers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cbuild submission: Error ⚠.
Regression testing: Success ✓.

The first 10 failing tests are:
analyze_exit_immediately [failed with core dumped]
cdb2api_rollback_rc [failed with core dumped]
reco-ddlk-sql **quarantined**
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**

@roborivers roborivers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cbuild submission: Error ⚠.
Regression testing: Success ✓.

The first 10 failing tests are:
sp_snapshot_generated
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
truncatesc_offline_generated [timeout] **quarantined**

@roborivers roborivers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cbuild submission: Error ⚠.
Regression testing: Success ✓.

The first 10 failing tests are:
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**

@mohitkhullar
mohitkhullar force-pushed the send-identity-to-comdb2db branch from d95807a to 036eaf7 Compare October 22, 2026 17:26
Signed-off-by: mkhullar <mohit.khullar@gmail.com>
@mohitkhullar
mohitkhullar force-pushed the send-identity-to-comdb2db branch from 036eaf7 to 53a1b1a Compare October 22, 2026 17:36
Comment thread cdb2api/cdb2api.c
flags |= CDB2_USE_OPTIONAL_IDENTITY;
if (cdb2_non_threaded_identity)
flags |= CDB2_NON_THREADED_IDENTITY;
id_blob = identity_cb->getIdentity(hndl, flags);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this account for hndl being NULL?

@mohitkhullar mohitkhullar Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, cdb2_getIdentity checks for hndl's identity only in the case its not NULL.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Got it. I guess for fdb queries this would use the server identity instead of the client identity here? And we can't cache identity here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, it will send server's identity for fdb queries. Server's/Task's identity remains same until refresh (which usually happens every 60 seconds).

@chands10 chands10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ok lgtm!

@mohitkhullar

Copy link
Copy Markdown
Contributor Author

Thanks

@roborivers roborivers left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cbuild submission: Success ✓.
Regression testing: Success ✓.

The first 10 failing tests are:
constraints_noreorder_generated [failed with core dumped]
constraints [failed with core dumped]
nowritetimeout
constraints_partial_index_off_generated
sqlqueries
snapshot_during_truncate **quarantined**
reco-ddlk-sql [timeout] **quarantined**
skipscan [timeout] **quarantined**

@mohitkhullar
mohitkhullar merged commit e09c886 into bloomberg:main Oct 23, 2026
5 checks passed
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