File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -35,15 +35,19 @@ import 'utils.dart' show canonicalizeVersion, ByteArrayEqualsExt;
3535final _logger = Logger ('integrity.check' );
3636final _random = math.Random .secure ();
3737
38+ /// The unmapped/unused fields that we expect to be present on some entities.
39+ /// The presence of such fields won't be reported as integrity issue, only
40+ /// the absent ones will be reported.
41+ const _allowedUnmappedFields = {
42+ 'Package.isWithheld' ,
43+ 'Package.withheldReason' ,
44+ };
45+
3846/// Checks the integrity of the datastore.
3947class IntegrityChecker {
4048 final DatastoreDB _db;
4149 final int _concurrency;
4250
43- static const _knownUnmappedFields = {
44- 'Package.isWithheld' ,
45- 'Package.withheldReason' ,
46- };
4751 final _unmappedFields = < String > {};
4852 final _userToOauth = < String , String ? > {};
4953 final _oauthToUser = < String , String > {};
@@ -101,7 +105,7 @@ class IntegrityChecker {
101105
102106 if (_unmappedFields.isNotEmpty) {
103107 for (final field in _unmappedFields) {
104- if (_knownUnmappedFields .contains (field)) continue ;
108+ if (_allowedUnmappedFields .contains (field)) continue ;
105109 yield 'Unmapped field found: $field .' ;
106110 }
107111 }
You can’t perform that action at this time.
0 commit comments