Skip to content

Commit

Permalink
Each thread creates the table that it is responsible for.
Browse files Browse the repository at this point in the history
  • Loading branch information
YangYumings committed Nov 28, 2024
1 parent fd3f210 commit b6bc436
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
public class TableStrategy extends IoTDBModelStrategy {

private static final Logger LOGGER = LoggerFactory.getLogger(TableStrategy.class);
protected static final Set<String> tables = new HashSet<>();

public TableStrategy(DBConfig dbConfig) {
super(dbConfig);
Expand Down Expand Up @@ -151,12 +150,7 @@ public Set<String> getAllTables(List<TimeseriesSchema> schemaList) {
Set<String> tableNames = new HashSet<>();
for (TimeseriesSchema timeseriesSchema : schemaList) {
DeviceSchema schema = timeseriesSchema.getDeviceSchema();
synchronized (IoTDB.class) {
if (!tables.contains(schema.getTable())) {
tableNames.add(schema.getTable());
tables.add(schema.getTable());
}
}
tableNames.add(schema.getTable());
}
return tableNames;
}
Expand Down

0 comments on commit b6bc436

Please sign in to comment.