Summary:
TabletPeer::tablet() was deprecated in https://github.com/yugabyte/yugabyte-db/commit/193a93621865d8bd027175138d3cc6ce8a4c3f19 However, we still had some usage left over.
Calling tablet() is not safe in production code -- in case the tablet was already deleted.
Fixes:
# Update TabletPeer::GetNamespaceId to rely on shared_tablet_safe() instead.
# Update a few other production code, esp in cdc, to check for null after shared_tablet() calls.
Jira: DB-17223
Test Plan: Jenkins
Reviewers: hsunder, rthallam
Reviewed By: hsunder
Subscribers: ybase, yql
Differential Revision: https://phorge.dev.yugabyte.com/D45037