private void addInternalDiskStore(DiskStoreImpl ds, UUIDFactory factory) throws StandardException { if (ds != null) { UUID id = factory.recreateUUID(ds.getName()); GfxdDiskStoreDescriptor dsd = new GfxdDiskStoreDescriptor(dd, id, ds, ds.getDiskDirs()[0].getAbsolutePath()); dd.addDescriptor(dsd, null, DataDictionary.SYSDISKSTORES_CATALOG_NUM, false, dd.getTransactionExecute()); } }
throws StandardException { checkForPendingTxChanges(lcc); status = lockForWriting(lcc.getTransactionExecute(), localOnly); synchronized (this) { localCacheMode = getCacheMode(); if (localCacheMode == DataDictionary.COMPILE_ONLY_MODE) { clearCaches(); setCacheMode(DataDictionary.DDL_MODE); status = lockForWriting(lcc.getTransactionExecute(), localOnly); if (SanityManager.DEBUG) { synchronized (this) { localCacheMode = getCacheMode();
EventErrorFileToDBWriter.dummy(); OplogIndexReader.init(); this.createGfxdDiagTables(tc); this.createStartAsyncQueueProcedure(tc, newlyCreatedRoutines); this.createStopAsyncQueueProcedure(tc, newlyCreatedRoutines); this.createStartGatewaySenderProcedure(tc, newlyCreatedRoutines); this.createStopGatewaySendereProcedure(tc, newlyCreatedRoutines); this.createAddListenerProcedure(tc, newlyCreatedRoutines); this.createAddWriterProcedure(tc, newlyCreatedRoutines); this.createRemoveListenerProcedure(tc, newlyCreatedRoutines); this.createRemoveWriterProcedure(tc, newlyCreatedRoutines); this.createAddLoaderProcedure(tc, newlyCreatedRoutines); this.createRemoveLoaderProcedure(tc, newlyCreatedRoutines); this.createSetQueryStatsProcedure(tc, newlyCreatedRoutines); this.createAddGatewayConflictResolverProcedure(tc, newlyCreatedRoutines); this.createRemoveGatewayConflictResolverProcedure(tc, newlyCreatedRoutines); this.createAddGatewayEventErrorHandlerProcedure(tc, newlyCreatedRoutines); this.createRemoveGatewayEventErrorHandlerProcedure(tc, newlyCreatedRoutines); this.createHDFSProcedures(tc, newlyCreatedRoutines); this.createGfxdSystemProcedures(tc, newlyCreatedRoutines);
/** * @see DataDictionary#transactionFinished * * @exception StandardException * Thrown on error */ @Override public void transactionFinished() throws StandardException { synchronized (this) { if (SanityManager.DEBUG) { SanityManager.ASSERT(ddlUsers > 0, "Number of DDL Users is <= 0 when finishing a transaction"); SanityManager.ASSERT(getCacheMode() == DataDictionary.DDL_MODE, "transactionFinished called when not in DDL_MODE"); } --ddlUsers; // We can only switch back to cached (COMPILE_ONLY) mode if there aren't // any readers that started in DDL_MODE. Otherwise we could get a reader // in DDL_MODE that reads a cached object that was brought in by a reader // in COMPILE_ONLY_MODE. If 2nd reader finished and releases it lock on // the cache there is nothing to prevent another writer from coming along // an deleting the cached object. if (ddlUsers == 0 && readersInDDLMode == 0) { clearCaches(); setCacheMode(DataDictionary.COMPILE_ONLY_MODE); } } }
UUIDFactory factory = dd.getUUIDFactory(); DiskStoreImpl ds = cache .findDiskStore(GfxdConstants.GFXD_DD_DISKSTORE_NAME); GfxdDiskStoreDescriptor dsd = new GfxdDiskStoreDescriptor(dd, id, ds, ds.getDiskDirs()[0].getAbsolutePath()); dd.addDescriptor(dsd, null, DataDictionary.SYSDISKSTORES_CATALOG_NUM, false, dd.getTransactionExecute()); GfxdDiskStoreDescriptor dsd = new GfxdDiskStoreDescriptor(dd, id, ds, ds.getDiskDirs()[0].getAbsolutePath()); dd.addDescriptor(dsd, null, DataDictionary.SYSDISKSTORES_CATALOG_NUM, false, dd.getTransactionExecute()); writeLockTaken = this.dd.lockForWriting(tc, false); this.memStore.initExternalCatalog(); this.dd.unlockAfterWriting(tc, false);
HashSet<?> newlyCreatedRoutines) throws StandardException { UUID sysUUID = getSystemSchemaDescriptor().getUUID(); UUID sqlJUUID = getSchemaDescriptor(SchemaDescriptor.STD_SQLJ_SCHEMA_NAME, tc, true).getUUID(); addBypassRoutine(routineUUID); Types.VARCHAR, 32672); UUID sysUtilUUID = getSystemUtilSchemaDescriptor().getUUID();
unlockAfterReading(lcc.getTransactionExecute()); if (mode != DataDictionary.COMPILE_ONLY_MODE) { synchronized (this) { clearCaches(); setCacheMode(DataDictionary.COMPILE_ONLY_MODE);
return_type); UUID routineID = getUUIDFactory().createUUID(); AliasDescriptor ads = new AliasDescriptor(this, routineID, aliasName, schemaID, procClass, AliasInfo.ALIAS_TYPE_PROCEDURE_AS_CHAR, routine_alias_info, null); addDescriptor(ads, null, DataDictionary.SYSALIASES_CATALOG_NUM, false, tc);
UUIDFactory factory = dd.getUUIDFactory(); DiskStoreImpl ds = cache .findDiskStore(GfxdConstants.GFXD_DD_DISKSTORE_NAME); GfxdDiskStoreDescriptor dsd = new GfxdDiskStoreDescriptor(dd, id, ds, ds.getDiskDirs()[0].getAbsolutePath()); dd.addDescriptor(dsd, null, DataDictionary.SYSDISKSTORES_CATALOG_NUM, false, dd.getTransactionExecute()); GfxdDiskStoreDescriptor dsd = new GfxdDiskStoreDescriptor(dd, id, ds, ds.getDiskDirs()[0].getAbsolutePath()); dd.addDescriptor(dsd, null, DataDictionary.SYSDISKSTORES_CATALOG_NUM, false, dd.getTransactionExecute()); writeLockTaken = this.dd.lockForWriting(tc, false); this.memStore.initExternalCatalog(); this.dd.unlockAfterWriting(tc, false);
HashSet<?> newlyCreatedRoutines) throws StandardException { UUID sysUUID = getSystemSchemaDescriptor().getUUID(); UUID sqlJUUID = getSchemaDescriptor(SchemaDescriptor.STD_SQLJ_SCHEMA_NAME, tc, true).getUUID(); addBypassRoutine(routineUUID); Types.VARCHAR, 32672); UUID sysUtilUUID = getSystemUtilSchemaDescriptor().getUUID();
/** * @see DataDictionary#transactionFinished * * @exception StandardException * Thrown on error */ @Override public void transactionFinished() throws StandardException { synchronized (this) { if (SanityManager.DEBUG) { SanityManager.ASSERT(ddlUsers > 0, "Number of DDL Users is <= 0 when finishing a transaction"); SanityManager.ASSERT(getCacheMode() == DataDictionary.DDL_MODE, "transactionFinished called when not in DDL_MODE"); } --ddlUsers; // We can only switch back to cached (COMPILE_ONLY) mode if there aren't // any readers that started in DDL_MODE. Otherwise we could get a reader // in DDL_MODE that reads a cached object that was brought in by a reader // in COMPILE_ONLY_MODE. If 2nd reader finished and releases it lock on // the cache there is nothing to prevent another writer from coming along // an deleting the cached object. if (ddlUsers == 0 && readersInDDLMode == 0) { clearCaches(); setCacheMode(DataDictionary.COMPILE_ONLY_MODE); } } }
unlockAfterReading(lcc.getTransactionExecute()); if (mode != DataDictionary.COMPILE_ONLY_MODE) { synchronized (this) { clearCaches(); setCacheMode(DataDictionary.COMPILE_ONLY_MODE);
return_type); UUID routineID = getUUIDFactory().createUUID(); AliasDescriptor ads = new AliasDescriptor(this, routineID, aliasName, schemaID, procClass, AliasInfo.ALIAS_TYPE_PROCEDURE_AS_CHAR, routine_alias_info, null); addDescriptor(ads, null, DataDictionary.SYSALIASES_CATALOG_NUM, false, tc);
EventErrorFileToDBWriter.dummy(); OplogIndexReader.init(); this.createGfxdDiagTables(tc); this.createStartAsyncQueueProcedure(tc, newlyCreatedRoutines); this.createStopAsyncQueueProcedure(tc, newlyCreatedRoutines); this.createStartGatewaySenderProcedure(tc, newlyCreatedRoutines); this.createStopGatewaySendereProcedure(tc, newlyCreatedRoutines); this.createAddListenerProcedure(tc, newlyCreatedRoutines); this.createAddWriterProcedure(tc, newlyCreatedRoutines); this.createRemoveListenerProcedure(tc, newlyCreatedRoutines); this.createRemoveWriterProcedure(tc, newlyCreatedRoutines); this.createAddLoaderProcedure(tc, newlyCreatedRoutines); this.createRemoveLoaderProcedure(tc, newlyCreatedRoutines); this.createSetQueryStatsProcedure(tc, newlyCreatedRoutines); this.createAddGatewayConflictResolverProcedure(tc, newlyCreatedRoutines); this.createRemoveGatewayConflictResolverProcedure(tc, newlyCreatedRoutines); this.createAddGatewayEventErrorHandlerProcedure(tc, newlyCreatedRoutines); this.createRemoveGatewayEventErrorHandlerProcedure(tc, newlyCreatedRoutines); this.createHDFSProcedures(tc, newlyCreatedRoutines); this.createGfxdSystemProcedures(tc, newlyCreatedRoutines);
throws StandardException { checkForPendingTxChanges(lcc); status = lockForWriting(lcc.getTransactionExecute(), localOnly); synchronized (this) { localCacheMode = getCacheMode(); if (localCacheMode == DataDictionary.COMPILE_ONLY_MODE) { clearCaches(); setCacheMode(DataDictionary.DDL_MODE); status = lockForWriting(lcc.getTransactionExecute(), localOnly); if (SanityManager.DEBUG) { synchronized (this) { localCacheMode = getCacheMode();
HashSet<?> newlyCreatedRoutines) throws StandardException { UUID sysUUID = getSystemSchemaDescriptor().getUUID(); UUID sqlJUUID = getSchemaDescriptor(SchemaDescriptor.STD_SQLJ_SCHEMA_NAME, tc, true).getUUID(); addBypassRoutine(routineUUID); Types.VARCHAR, 32672); UUID sysUtilUUID = getSystemUtilSchemaDescriptor().getUUID();
/** * @see DataDictionary#transactionFinished * * @exception StandardException * Thrown on error */ @Override public void transactionFinished() throws StandardException { synchronized (this) { if (SanityManager.DEBUG) { SanityManager.ASSERT(ddlUsers > 0, "Number of DDL Users is <= 0 when finishing a transaction"); SanityManager.ASSERT(getCacheMode() == DataDictionary.DDL_MODE, "transactionFinished called when not in DDL_MODE"); } --ddlUsers; // We can only switch back to cached (COMPILE_ONLY) mode if there aren't // any readers that started in DDL_MODE. Otherwise we could get a reader // in DDL_MODE that reads a cached object that was brought in by a reader // in COMPILE_ONLY_MODE. If 2nd reader finished and releases it lock on // the cache there is nothing to prevent another writer from coming along // an deleting the cached object. if (ddlUsers == 0 && readersInDDLMode == 0) { clearCaches(); setCacheMode(DataDictionary.COMPILE_ONLY_MODE); } } }
unlockAfterReading(lcc.getTransactionExecute()); if (mode != DataDictionary.COMPILE_ONLY_MODE) { synchronized (this) { clearCaches(); setCacheMode(DataDictionary.COMPILE_ONLY_MODE);
return_type); UUID routineID = getUUIDFactory().createUUID(); AliasDescriptor ads = new AliasDescriptor(this, routineID, aliasName, schemaID, procClass, AliasInfo.ALIAS_TYPE_PROCEDURE_AS_CHAR, routine_alias_info, null); addDescriptor(ads, null, DataDictionary.SYSALIASES_CATALOG_NUM, false, tc);
EventErrorFileToDBWriter.dummy(); OplogIndexReader.init(); this.createGfxdDiagTables(tc); this.createStartAsyncQueueProcedure(tc, newlyCreatedRoutines); this.createStopAsyncQueueProcedure(tc, newlyCreatedRoutines); this.createStartGatewaySenderProcedure(tc, newlyCreatedRoutines); this.createStopGatewaySendereProcedure(tc, newlyCreatedRoutines); this.createAddListenerProcedure(tc, newlyCreatedRoutines); this.createAddWriterProcedure(tc, newlyCreatedRoutines); this.createRemoveListenerProcedure(tc, newlyCreatedRoutines); this.createRemoveWriterProcedure(tc, newlyCreatedRoutines); this.createAddLoaderProcedure(tc, newlyCreatedRoutines); this.createRemoveLoaderProcedure(tc, newlyCreatedRoutines); this.createSetQueryStatsProcedure(tc, newlyCreatedRoutines); this.createAddGatewayConflictResolverProcedure(tc, newlyCreatedRoutines); this.createRemoveGatewayConflictResolverProcedure(tc, newlyCreatedRoutines); this.createAddGatewayEventErrorHandlerProcedure(tc, newlyCreatedRoutines); this.createRemoveGatewayEventErrorHandlerProcedure(tc, newlyCreatedRoutines); this.createHDFSProcedures(tc, newlyCreatedRoutines); this.createGfxdSystemProcedures(tc, newlyCreatedRoutines);