OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database Proxy

V3.1.0Enterprise Edition

  • About ODP
    • What is OceanBase Database Proxy?
    • Glossary
  • Installation and Deployment
    • Preparation
    • Install ODP by using RPM packages
    • Manage OBProxies
      • Create an OBProxy cluster
      • Take over an OBProxy
      • Delete an OBProxy
      • Restart an OBProxy
      • Upgrade an OBProxy
      • Add an OBProxy
      • Refresh OBProxy configurations
      • Monitor OBProxy cluster performance
      • OBProxy cluster parameter management
      • Add a connectable OceanBase cluster
      • Delete an OBProxy cluster
      • Upgrade all OBProxies in an OBProxy cluster
      • Restart all OBProxies in an OBProxy cluster
      • Delete a connected OceanBase cluster
  • User Guide
    • Configuration
      • Obtain and modify configurations
      • Parameters
      • Dynamically modifiable parameters
      • Parameters that are not dynamically modifiable
      • Internal and inherited parameters
      • In-memory parameters
    • SQL statement routing
      • Create and update the RootService list
      • Create and update the location cache

Download PDF

What is OceanBase Database Proxy? Glossary Preparation Install ODP by using RPM packages Create an OBProxy cluster Take over an OBProxy Delete an OBProxy Restart an OBProxy Upgrade an OBProxy Add an OBProxy Refresh OBProxy configurations Monitor OBProxy cluster performance OBProxy cluster parameter management Add a connectable OceanBase cluster Delete an OBProxy cluster Upgrade all OBProxies in an OBProxy cluster Restart all OBProxies in an OBProxy cluster Delete a connected OceanBase cluster Obtain and modify configurations Parameters Dynamically modifiable parameters Parameters that are not dynamically modifiable Internal and inherited parameters In-memory parameters Create and update the RootService list Create and update the location cache
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogLive DemosTraining & CertificationTicket
Company
About OceanBaseTrust CenterLegalPartnerContact Us
Follow Us

© OceanBase 2026. All rights reserved

Cloud Service AgreementPrivacy PolicySecurity
Contact Us
Document Feedback
  1. Documentation Center
  2. OceanBase Database Proxy
  3. V3.1.0
iconOceanBase Database Proxy
V 3.1.0Enterprise Edition
Databases
  • OceanBase Database
  • OceanBase Cloud
  • OceanBase Tugraph
  • Interactive Tutorials
  • OceanBase Best Practices
Tools
  • OceanBase Cloud Platform
  • OceanBase Migration Service
  • OceanBase Developer Center
  • OceanBase Migration Assessment
  • OceanBase Admin Tool
  • OceanBase Loader and Dumper
  • OceanBase Deployer
  • Kubernetes operator for OceanBase
  • OceanBase Diagnostic Tool
  • OceanBase Binlog Service
Connectors and Middleware
  • OceanBase Database Proxy
  • Embedded SQL in C for OceanBase
  • OceanBase Call Interface
  • OceanBase Connector/C
  • OceanBase Connector/J
  • OceanBase Connector/ODBC
  • OceanBase Connector/NET
  • V 4.3.6
  • V 4.3.4
  • V 4.3.3
  • V 4.3.2
  • V 4.3.1
  • V 4.3.0
  • V 4.2.3
  • V 4.2.2
  • V 4.2.0 and earlier

Create and update the location cache

Last Updated:2026-04-14 01:41:29  Updated
Share
What is on this page
What is the location cache?
Create and update the location cache of a table or partition
Create the location cache
Automatically update the location cache
Conditions that trigger the update of the location cache
Manually update the location cache
Create and update the location cache of a user tenant
Create the location cache
Automatically update the location cache
Conditions that trigger the update of the location cache
Manually update the location cache
Create and update the location cache of the sys tenant
Create the location cache
Automatically update the location cache
Manually update the location cache

folded

Share

This topic describes how to create and update the location cache. Updates may occur automatically, manually, or based on specific triggering conditions.

What is the location cache?

The location cache, also known as the table entry or partition entry, is a list containing the IP addresses of all servers that host the replicas of a table. Three types of location caches are available:

  • The location cache of a table or partition. It contains the IP addresses of all servers that host the replicas of the table or partition.

  • The location cache of a user tenant. It contains the IP addresses of all servers of the tenant.

  • The location cache of the sys tenant. It contains the IP addresses of all servers in the cluster.

Create and update the location cache of a table or partition

Create the location cache

When ODP accesses a table or partition for the first time, it queries the __all_virtual_proxy_schema WHERE table_name = "xxx" table of the sys tenant to get the location cache of the table or partition. This query uses the location cache of the sys tenant.

Automatically update the location cache

If the number of servers in the cluster changes, ODP randomly deletes expired servers within one minute.

Conditions that trigger the update of the location cache

  • If strong consistency read is enabled and the leader replica is not found, ODP sets the location cache status to 'dirty'.

  • If rerouting takes place under the following circumstances, ODP sets the location cache status to 'dirty':

  • If rerouting does not take place under the following circumstances, ODP sets the location cache status to 'dirty':

  • If the server returns the LOGIN_CONNECT_ERROR or REQUEST_CONNECT_ERROR error, ODP sets the location cache status to 'dirty'.

  • During the execution of an SQL statement, if the server returns tenant not in server, ODP sets the location cache status to 'dirty'.

  • When weak or strong consistency read is enabled, if the location cache of a table contains a replica that is not in the location cache of the tenant, but this replica is in the same IDC or region with the tenant, ODP sets the location cache status to 'dirty'.

  • When a request is routed to a new server, but the number of failed connection attempts exceeds the threshold (a different server is tried every time an attempt fails), ODP sets the location cache status to 'dirty'.

Manually update the location cache

You can manually update the location cache of a table or partition through the following methods:

  • Set enable_qa_mode = true and use the location_expire_period parameter. If the location cache has existed for a period longer than location_expire_period, it is deleted by ODP.

  • Use the partition_location_expire_relative_time parameter. If the location cache was created before the sum of the time when you configured the partition_location_expire_relative_time parameter and the partition_location_expire_relative_time, it is deleted by ODP.

Create and update the location cache of a user tenant

Create the location cache

When ODP accesses a user tenant for the first time, it queries the __all_virtual_proxy_schema WHERE table_name = "__all_dummy" table of the sys tenant to get the location cache of the user tenant. This query uses the location cache of the sys tenant.

Automatically update the location cache

If the number of servers in the cluster changes, ODP randomly deletes expired servers within one minute.

Conditions that trigger the update of the location cache

  • The status of the tenant location cache is checked by every transaction of every session. If the check fails, ODP sets the location cache status to 'dirty', and immediately updates the location cache. The check fails when the location cache of the tenant is in one of the following conditions:

  • During the execution of an SQL statement, if the server returns tenant not in server, ODP sets the location cache status to 'dirty'.

  • When weak or strong consistency read is enabled, if the location cache of a table contains a replica that is not in the location cache of the tenant, but this replica is in the same IDC or region with the tenant, ODP sets the location cache status to 'dirty'.

  • When a request is routed to a new server, but the number of failed connection attempts exceeds the threshold (a different server is tried every time an attempt fails), ODP sets the location cache status to 'dirty'.

  • If the number of servers in the cluster changes, ODP randomly deletes expired servers within one minute.

Manually update the location cache

You can manually update the location cache of a user tenant through the following methods:

  • Set enable_qa_mode = true and use the location_expire_period parameter. If the location cache has existed for a period longer than location_expire_period, it is deleted by ODP.

  • Use the partition_location_expire_relative_time parameter. If the location cache was created before the sum of the current time and the partition_location_expire_relative_time, it is deleted by ODP.

Note

If you change the location cache status to 'dirty' or delete it, you must update or create the location cache the next time you access the tenant. ODP will update a dirty location cache. The update of the location cache does not impact the processing of other concurrent requests. However, the processing of concurrent requests is suspended during the creation of the location cache.

Create and update the location cache of the sys tenant

Create the location cache

When you create a cluster, ODP obtains the location cache of the sys tenant from the RootService list. At this moment, the location cache of the sys tenant is RS list [null].

Automatically update the location cache

  • After you create the cluster, ODP periodically accesses the all_virtual_proxy_server_stat table to get the list of servers. If the list is changed, ODP updates the location cache of the sys tenant. The location cache of the sys tenant then changes to RS list [list of servers] .

  • When ODP retrieves the RS list from the configuration server, it updates the location cache of the sys tenant. At this moment, the location cache of the sys tenant is RS list [null].

Manually update the location cache

Set enable_qa_mode = true and use the location_expire_period parameter. If the location cache has existed for a period longer than location_expire_period, it is deleted by ODP.

Previous topic

Create and update the RootService list
Last
What is on this page
What is the location cache?
Create and update the location cache of a table or partition
Create the location cache
Automatically update the location cache
Conditions that trigger the update of the location cache
Manually update the location cache
Create and update the location cache of a user tenant
Create the location cache
Automatically update the location cache
Conditions that trigger the update of the location cache
Manually update the location cache
Create and update the location cache of the sys tenant
Create the location cache
Automatically update the location cache
Manually update the location cache