You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
149153: sql,eventpb: log structured event for REFRESH MATERIALIZED VIEW r=rafiss a=rafiss
### sql: add backfill validation for entries written by BulkAdder
This patch fixes the logic for counting the number of entries written by
the BulkAdder during the backfillQueryIntoTable operation, which is used
by CREATE TABLE AS, CREATE MATERIALIZED VIEW, and REFRESH MATERIALIZED
VIEW.
We now use this count when validating the backfill, as an additional
check.
### sql,eventpb: log structured event for REFRESH MATERIALIZED VIEW
fixes#144863
Release note (ops change): A structured event is now logged in the
SQL_SCHEMA channgel when the REFRESH MATERIALIZED VIEW statement is
executed.
Co-authored-by: Rafi Shamim <[email protected]>
Copy file name to clipboardExpand all lines: docs/generated/eventlog.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1871,6 +1871,29 @@ initiated schema change rollback has completed.
1871
1871
|`DescriptorID`|| no |
1872
1872
1873
1873
1874
+
#### Common fields
1875
+
1876
+
| Field | Description | Sensitive |
1877
+
|--|--|--|
1878
+
|`Timestamp`| The timestamp of the event. Expressed as nanoseconds since the Unix epoch. | no |
1879
+
|`EventType`| The type of the event. | no |
1880
+
|`Statement`| A normalized copy of the SQL statement that triggered the event. The statement string contains a mix of sensitive and non-sensitive details (it is redactable). | partially |
1881
+
|`Tag`| The statement tag. This is separate from the statement string, since the statement string can contain sensitive information. The tag is guaranteed not to. | no |
1882
+
|`User`| The user account that triggered the event. The special usernames `root` and `node` are not considered sensitive. | depends |
1883
+
|`DescriptorID`| The primary object descriptor affected by the operation. Set to zero for operations that don't affect descriptors. | no |
1884
+
|`ApplicationName`| The application name for the session where the event was emitted. This is included in the event to ease filtering of logging output by application. | no |
1885
+
|`PlaceholderValues`| The mapping of SQL placeholders to their values, for prepared statements. | yes |
1886
+
1887
+
### `refresh_materialized_view`
1888
+
1889
+
An event of type `refresh_materialized_view` is recorded when a materialized view is refreshed.
1890
+
1891
+
1892
+
| Field | Description | Sensitive |
1893
+
|--|--|--|
1894
+
|`ViewName`| The name of the materialized view being refreshed. | no |
returnerrors.AssertionFailedf("backfill query did not populate index %q with expected number of rows (expected: %d, got: %d)", index.GetName(), entryCount, count)
returnerrors.AssertionFailedf("backfill query did not populate index %q with expected number of rows (expected: %d, got: %d)", index.GetName(), aostEntryCount, newTblEntryCount)
0 commit comments