[
https://issues.apache.org/jira/browse/AURORA-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14728264#comment-14728264
]
Joshua Cohen commented on AURORA-1476:
--------------------------------------
I didn't dig into the actual code, I was just speaking from experience with
mybatis creating empty collections for relations where no data was present
(e.g. a left join onto a table results in all of that tables columns being null
and mybatis would create an empty collection as a result). If that's not the
case in this instance than feel free to ignore :).
> TaskConfig dedupe routine does not handle null fields properly
> --------------------------------------------------------------
>
> Key: AURORA-1476
> URL: https://issues.apache.org/jira/browse/AURORA-1476
> Project: Aurora
> Issue Type: Bug
> Components: Scheduler
> Reporter: Bill Farner
> Assignee: Bill Farner
> Priority: Minor
>
> When myBatis reads relations, it will create an empty collection when no
> relations exist (as opposed to leaving the fields null). In
> {{TaskConfigManager.insert}}, we try to re-use a relation that has already
> been inserted to save space. However, if a relation is null, it will be read
> back as an empty collection and considered non-equal. This can in turn cause
> an IllegalArgumentException:
> {noformat}
> at
> com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:150)
> at
> com.google.common.collect.RegularImmutableMap.checkNoConflictInBucket(RegularImmutableMap.java:104)
> at
> com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:70)
> at
> com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:254)
> at com.google.common.collect.Maps.uniqueIndex(Maps.java:1166)
> at com.google.common.collect.Maps.uniqueIndex(Maps.java:1140)
> at
> org.apache.aurora.scheduler.storage.db.TaskConfigManager.getConfigRow(TaskConfigManager.java:47)
> at
> org.apache.aurora.scheduler.storage.db.TaskConfigManager.insert(TaskConfigManager.java:61)
> at
> org.apache.aurora.scheduler.storage.db.DbJobUpdateStore.saveJobUpdate(DbJobUpdateStore.java:110)
> at
> org.apache.aurora.scheduler.storage.log.SnapshotStoreImpl$7.restoreFromSnapshot(SnapshotStoreImpl.java:211)
> at
> org.apache.aurora.scheduler.storage.log.SnapshotStoreImpl$9.execute(SnapshotStoreImpl.java:278)
> at
> org.apache.aurora.scheduler.storage.Storage$MutateWork$NoResult.apply(Storage.java:137)
> at
> org.apache.aurora.scheduler.storage.Storage$MutateWork$NoResult.apply(Storage.java:132)
> at
> org.apache.aurora.scheduler.storage.db.DbStorage.transactionedWrite(DbStorage.java:152)
> at
> org.mybatis.guice.transactional.TransactionalMethodInterceptor.invoke(TransactionalMethodInterceptor.java:101)
> at
> org.apache.aurora.scheduler.storage.db.DbStorage.write(DbStorage.java:165)
> at
> org.apache.aurora.scheduler.storage.log.SnapshotStoreImpl.applySnapshot(SnapshotStoreImpl.java:272)
> at
> org.apache.aurora.scheduler.storage.log.SnapshotStoreImpl.applySnapshot(SnapshotStoreImpl.java:63)
> at
> org.apache.aurora.scheduler.storage.backup.TemporaryStorage$TemporaryStorageFactory.apply(TemporaryStorage.java:73)
> at
> org.apache.aurora.scheduler.storage.backup.TemporaryStorage$TemporaryStorageFactory.apply(TemporaryStorage.java:66)
> at
> org.apache.aurora.scheduler.storage.backup.Recovery$RecoveryImpl.stage(Recovery.java:151)
> at
> org.apache.aurora.scheduler.thrift.SchedulerThriftInterface.stageRecovery(SchedulerThriftInterface.java:759)
> at
> org.apache.aurora.scheduler.thrift.aop.ThriftStatsExporterInterceptor.invoke(ThriftStatsExporterInterceptor.java:47)
> at
> org.apache.aurora.scheduler.thrift.aop.FeatureToggleInterceptor.invoke(FeatureToggleInterceptor.java:38)
> at
> org.apache.aurora.scheduler.thrift.aop.UserCapabilityInterceptor.invoke(UserCapabilityInterceptor.java:92)
> at
> org.apache.aurora.scheduler.thrift.aop.LoggingInterceptor.invoke(LoggingInterceptor.java:101)
> at
> org.apache.aurora.scheduler.thrift.aop.ServerInfoInterceptor.invoke(ServerInfoInterceptor.java:30)
> at
> org.apache.aurora.scheduler.http.api.security.ShiroAuthorizingInterceptor.invoke(ShiroAuthorizingInterceptor.java:86)
> at
> org.apache.aurora.scheduler.http.api.security.ShiroAuthenticatingThriftInterceptor.invoke(ShiroAuthenticatingThriftInterceptor.java:55)
> at
> org.apache.aurora.gen.AuroraAdmin$Processor$stageRecovery.getResult(AuroraAdmin.java:1236)
> at
> org.apache.aurora.gen.AuroraAdmin$Processor$stageRecovery.getResult(AuroraAdmin.java:1221)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)