Skip to content

Commit f59821b

Browse files
author
Michal Jankowski
committed
WL#15738: Flush Mask Dictionary from table to memory
All components that have tables that can be changed on a primary and run on replicas - need to include the ability to call the scheduler component and flush the data on the secondary or replica into memory. This worklog is to implement the ability to periodically refresh the in-memory cache of masking dictionaries from the underlying table. The flush may be requested by the user ad hoc (by calling UDF) or periodically, leveraging the scheduler component. In particular, the periodical flush is required in MDS scenarios. Change-Id: Ib57b4f5abdd404e39fb89fd3348245d10f4296c1
1 parent 82708f7 commit f59821b

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

include/mysql/components/component_implementation.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,21 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
309309
&mysql_service_##service))) \
310310
}
311311

312+
/**
313+
Adds a Service implementation requirement with a pointer to placeholder to the
314+
list of components.
315+
316+
@param service A referenced Service name.
317+
@param implementation A referenced Service implementation name.
318+
*/
319+
#define REQUIRES_SERVICE_IMPLEMENTATION(service, implementation) \
320+
{ \
321+
#service "." #implementation, \
322+
static_cast < void **> \
323+
(static_cast <void *>(const_cast <mysql_service_##service##_t **>( \
324+
&mysql_service_##service))) \
325+
}
326+
312327
/**
313328
Adds a Service requirement with a pointer to placeholder to the list of
314329
components.
@@ -325,6 +340,23 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
325340
const_cast <mysql_service_##service##_t **>(&name))) \
326341
}
327342

343+
/**
344+
Adds a Service implementation requirement with a pointer to placeholder to the
345+
list of components.
346+
347+
Use with @ref REQUIRES_SERVICE_IMPLEMENTATION_AS().
348+
349+
@param service A referenced Service name.
350+
@param implementation A referenced Service implementation name.
351+
@param name Service handle name.
352+
*/
353+
#define REQUIRES_SERVICE_IMPLEMENTATION_AS(service, implementation, name) \
354+
{ \
355+
#service "." #implementation, \
356+
static_cast < void **>(static_cast <void *>( \
357+
const_cast <mysql_service_##service##_t **>(&name))) \
358+
}
359+
328360
/**
329361
Use this macro to reference the service placeholder as defined by the
330362
REQUIRES_SERVICE_PLACEHOLDER macro.

share/messages_to_error_log.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12571,6 +12571,15 @@ ER_IB_ERR_CORRUPT_TABLESPACE_UNRECOVERABLE
1257112571
ER_IB_BULK_LOAD_STATS_WARN
1257212572
eng "%s: Failed to save statistics for table=%s err=%zu"
1257312573

12574+
ER_COMPONENT_MASKING_INVALID_FLUSH_INTERVAL_VALUE
12575+
eng "Invalid flush interval specified: %lu. Valid values are 0 (off) or greater than or equal to %d. Adjusting to %d."
12576+
12577+
ER_COMPONENT_MASKING_VAR_REGISTRATION_FAILURE
12578+
eng "Cannot register variable '%s'.'%s'."
12579+
12580+
ER_COMPONENT_MASKING_NOTIFICATION_REGISTRATION_FAILURE
12581+
eng "Masking component failed to register notification service. Periodical masking dictionaries flush will not work."
12582+
1257412583
# DO NOT add server-to-client messages here;
1257512584
# they go in messages_to_clients.txt
1257612585
# in the same directory as this file.

0 commit comments

Comments
 (0)