wonderfulxin opened a new issue, #32040:
URL: https://github.com/apache/shardingsphere/issues/32040

   SchemaMetaData load very slow
   i use shardingjdbc 5.3.2
   '''
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-jdbc-core</artifactId>
               <version>5.3.2</version>
           </dependency>
   '''
   but when i load SchemaMetaData ,it is very slow,i don't know why?just 
because my data is too big??
   each.get()  is very very  very  slow!!!  how to solve it? thinks!!
   '''
    public static Map<String, SchemaMetaData> load(final 
Collection<SchemaMetaDataLoaderMaterial> materials) throws SQLException {
           Map<String, SchemaMetaData> result = new 
LinkedHashMap<>(materials.size(), 1);
           Collection<Future<Collection<SchemaMetaData>>> futures = new 
LinkedList<>();
           for (SchemaMetaDataLoaderMaterial each : materials) {
               futures.add(EXECUTOR_SERVICE.submit(() -> load(each)));
           }
           try {
               for (Future<Collection<SchemaMetaData>> each : futures) {
                   mergeSchemaMetaDataMap(result, each.get());
               }
           } catch (final InterruptedException | ExecutionException ex) {
               if (ex.getCause() instanceof SQLException) {
                   throw (SQLException) ex.getCause();
               }
               throw new UnknownSQLException(ex).toSQLException();
           }
           return result;
       }
   '''


-- 
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]

Reply via email to