isaric commented on code in PR #5416:
URL: https://github.com/apache/solr/pull/5416#discussion_r4772781964
##########
solr/core/src/java/org/apache/solr/schema/ManagedIndexSchema.java:
##########
@@ -169,6 +172,8 @@ boolean persistManagedSchemaToZooKeeper(boolean createOnly)
{
zkLoader.getConfigSetZkPath() + "/" + managedSchemaResourceName;
boolean success = true;
boolean schemaChangedInZk = false;
+ // outside the try below, so that the client gets this 400 and not a
generic 500
+ SchemaMetadata.validateTotalSize(this);
Review Comment:
Non-blocking nit: `persist(writer)` a few lines below validates the total
size again, so the ZooKeeper path checks twice. The comment explains why this
early call exists (a 400 instead of a wrapped 500), so this is just noting the
duplication; if `persist` ever stops validating, this call carries the check
alone.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]