Skip to content

Core internals sweep: comparator naming, join-derivation signature, publication invariant, silent close #417

Description

@zantvoort

Grouped internal-quality items in storm-core, none user-visible:

  • Identical (Identical.java:26) performs identity comparison and Same (Same.java:24) performs value comparison; in ordinary usage the names suggest the opposite, and these are the two most safety-critical predicates in dirty checking. IdentityComparator/ValueComparator say what they do.
  • TemplatePreparation.addAutoJoins (:901-913) takes 11 parameters including three booleans, and its overloads share a name at different arities. This is the code that decides the entire join set; a context record holding the stable arguments would leave the genuinely varying ones visible and make conditions like beyondRef && !referenced.hydrated().contains(pkPath) (:984) legible.
  • The cached TemplateProcessor's cross-thread safety rests entirely on SegmentedLruCache.putIfAbsent's synchronized segments (SqlTemplateImpl.java:420) supplying the happens-before edge for its non-volatile fields. Correct today, but unstated; one sentence in the class comment naming the cache as the publication barrier protects an invariant that is close to untestable if broken.
  • EntityRepositoryImpl.java:2314: catch (Exception ignore) {} in closeQuietly, the only silent catch in the module. Log at debug or collect as suppressed.
  • SqlInterceptorManager.java:23 carries @SuppressWarnings("ALL") on a 524-line public concurrency class; narrow it to whatever warning prompted it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    corestorm-core and foundation workenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions