Skip to content

feat(bigtable): support tiered storage#13793

Merged
bhshkh merged 2 commits intogoogleapis:mainfrom
bhshkh:feat/cbt-tiered-storage
Feb 5, 2026
Merged

feat(bigtable): support tiered storage#13793
bhshkh merged 2 commits intogoogleapis:mainfrom
bhshkh:feat/cbt-tiered-storage

Conversation

@bhshkh
Copy link
Copy Markdown
Contributor

@bhshkh bhshkh commented Feb 5, 2026

More about tiered storage: https://docs.cloud.google.com/bigtable/docs/tiered-storage

Related protos:

// Rules to specify what data is stored in each storage tier.
// Different tiers store data differently, providing different trade-offs
// between cost and performance. Different parts of a table can be stored
// separately on different tiers.
// If a config is specified, tiered storage is enabled for this table.
// Otherwise, tiered storage is disabled.
// Only SSD instances can configure tiered storage.
TieredStorageConfig *TieredStorageConfig `protobuf:"bytes,14,opt,name=tiered_storage_config,json=tieredStorageConfig,proto3" json:"tiered_storage_config,omitempty"`

// Config for tiered storage.
// A valid config must have a valid TieredStorageRule. Otherwise the whole
// TieredStorageConfig must be unset.
// By default all data is stored in the SSD tier (only SSD instances can
// configure tiered storage).
type TieredStorageConfig struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Rule to specify what data is stored in the infrequent access(IA) tier.
// The IA tier allows storing more data per node with reduced performance.
InfrequentAccess *TieredStorageRule `protobuf:"bytes,1,opt,name=infrequent_access,json=infrequentAccess,proto3" json:"infrequent_access,omitempty"`
}

// Rule to specify what data is stored in a storage tier.
type TieredStorageRule struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Rules to specify what data is stored in this tier.
//
// Types that are assignable to Rule:
//
// *TieredStorageRule_IncludeIfOlderThan
Rule isTieredStorageRule_Rule `protobuf_oneof:"rule"`
}

type isTieredStorageRule_Rule interface {
isTieredStorageRule_Rule()
}
type TieredStorageRule_IncludeIfOlderThan struct {
// Include cells older than the given age.
// For the infrequent access tier, this value must be at least 30 days.
IncludeIfOlderThan *durationpb.Duration `protobuf:"bytes,1,opt,name=include_if_older_than,json=includeIfOlderThan,proto3,oneof"`
}
func (*TieredStorageRule_IncludeIfOlderThan) isTieredStorageRule_Rule() {}

@bhshkh bhshkh requested review from a team February 5, 2026 16:01
@bhshkh bhshkh requested review from a team as code owners February 5, 2026 16:01
@product-auto-label product-auto-label Bot added the api: bigtable Issues related to the Bigtable API. label Feb 5, 2026
@bhshkh bhshkh enabled auto-merge (squash) February 5, 2026 16:01
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @bhshkh, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request integrates support for Bigtable's tiered storage feature into the client library. It provides developers with the ability to define and manage data retention policies for infrequent access tiers directly through the API. The changes encompass new data structures for configuration, updated client methods for table operations, and robust testing to ensure the reliability of this new functionality.

Highlights

  • New Tiered Storage Types: Introduced new Go types: TieredStorageConfig, TieredStorageRule, and TieredStorageIncludeIfOlderThan to model Bigtable's tiered storage configurations.
  • Table Configuration and Information Updates: Extended the TableConf struct for creating tables and the TableInfo struct for retrieving table details to include the new TieredStorageConfig.
  • New Admin Client Methods: Added new AdminClient methods: CreateTableFromConf now supports tiered storage, and dedicated methods UpdateTableWithTieredStorageConfig and UpdateTableRemoveTieredStorageConfig are available for managing existing table configurations.
  • Comprehensive Testing: Included extensive unit and integration tests to validate the creation, retrieval, update, and removal of tiered storage configurations, ensuring the feature's reliability.
Changelog
  • bigtable/admin.go
    • Defined new types: TieredStorageConfig, TieredStorageRule, and TieredStorageIncludeIfOlderThan for modeling tiered storage.
    • Added a toProto() conversion method for TieredStorageConfig.
    • Updated TableConf and TableInfo structs to include a TieredStorageConfig field.
    • Modified CreateTableFromConf to process TieredStorageConfig during table creation.
    • Introduced tieredStorageConfigFieldMask for update operations.
    • Added UpdateTableWithTieredStorageConfig and UpdateTableRemoveTieredStorageConfig methods to AdminClient.
    • Enhanced TableInfo retrieval to populate TieredStorageConfig.
  • bigtable/admin_test.go
    • Imported durationpb for protobuf duration handling.
    • Extended mockTableAdminClock with GetTable mock functionality.
    • Added unit tests for CreateTableFromConf with tiered storage.
    • Included unit tests for UpdateTableWithTieredStorageConfig, TableInfo retrieval of tiered storage, and UpdateTableRemoveTieredStorageConfig.
  • bigtable/integration_test.go
    • Added TestIntegration_TieredStorage to verify end-to-end functionality of creating, updating, and removing tiered storage configurations on a live Bigtable instance.
    • Implemented a skip condition for the Bigtable emulator, as it does not support this feature.
Activity
  • The pull request introduces a new feature for Bigtable: tiered storage.
  • The author, bhshkh, has implemented the necessary Go types, client methods, and tests to support this functionality.
  • No external review comments or specific progress updates are available in the provided context.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for tiered storage in Bigtable, a new feature that allows for cost-effective storage of infrequently accessed data. The changes include new configuration types, modifications to table creation and update logic to handle the new settings, and updates to the TableInfo struct to expose this configuration. The implementation is well-supported by both unit and integration tests that cover the lifecycle of the tiered storage configuration. My review includes a couple of suggestions to improve robustness and API consistency.

Comment thread bigtable/admin.go
Comment thread bigtable/admin.go Outdated
Comment thread bigtable/admin.go Outdated
@bhshkh bhshkh merged commit 39a25b9 into googleapis:main Feb 5, 2026
12 checks passed
@bhshkh bhshkh deleted the feat/cbt-tiered-storage branch February 5, 2026 18:41
bhshkh added a commit that referenced this pull request Mar 16, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v0.8.0
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/librarian-go@sha256:19bb93e8f1f916c61b597db2bad65dc432f79baaabb210499d7d0e4ad1dffe29
<details><summary>bigtable: 1.43.0</summary>

##
[1.43.0](bigtable/v1.42.0...bigtable/v1.43.0)
(2026-03-16)

### Features

* Add support for creating Instance with tags (#13459)
([1bce843](1bce843e))

* support tiered storage (#13793)
([39a25b9](39a25b92))

* add handling of longupdown metrics aka gauge (#13871)
([519ed9b](519ed9b0))

* Use direct access when supported. Guarded by enabling… (#13873)
([5ea1f5f](5ea1f5f9))

* add preemptive connection recycler (#13860)
([6b69ee3](6b69ee38))

* make downscalling less aggressive (#14123)
([7ac72cc](7ac72cc8))

* add pacemaker in connpool (#13862)
([9af047f](9af047f7))

* populate ip protocol for direct access checker and rename a method to
be concise (#14011)
([9c5e655](9c5e6551))

* add connection factory to abstract connection (#13755)
([b08ea15](b08ea15f))

* make pow of 2 default lb policy (#14131)
([b5f7bf2](b5f7bf27))

* derive conn pool from resolver (#14147)
([b903e29](b903e299))

* add load balancing penalty for channel (#14149)
([bb64998](bb649988))

* cap increase in conn for dynamic chan pool (#14144)
([e0701a4](e0701a46))

* switch to rand v2 (#14008)
([ee6f425](ee6f4251))

### Bug Fixes

* slighly change instruction for direct access (#14119)
([7dd4948](7dd4948d))

* refactor bigtable.go into separate file path per interfaces (#13818)
([c8ae2e2](c8ae2e2a))

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the Bigtable API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants