Try to locate crash with incremental changes
This commit is contained in:
parent
c779f4b69d
commit
bf242fa58c
1 changed files with 10 additions and 7 deletions
|
@ -66,10 +66,11 @@ public class IncrementalChangesManager {
|
||||||
|
|
||||||
public void indexMainMap(File f, long dateCreated) {
|
public void indexMainMap(File f, long dateCreated) {
|
||||||
String nm = Algorithms.getFileNameWithoutExtension(f).toLowerCase();
|
String nm = Algorithms.getFileNameWithoutExtension(f).toLowerCase();
|
||||||
if(!regions.containsKey(nm)) {
|
|
||||||
regions.put(nm, new RegionUpdateFiles(nm));
|
|
||||||
}
|
|
||||||
RegionUpdateFiles regionUpdateFiles = regions.get(nm);
|
RegionUpdateFiles regionUpdateFiles = regions.get(nm);
|
||||||
|
if(regionUpdateFiles == null) {
|
||||||
|
regionUpdateFiles = new RegionUpdateFiles(nm);
|
||||||
|
regions.put(nm, regionUpdateFiles);
|
||||||
|
}
|
||||||
regionUpdateFiles.mainFile = f;
|
regionUpdateFiles.mainFile = f;
|
||||||
regionUpdateFiles.mainFileInit = dateCreated;
|
regionUpdateFiles.mainFileInit = dateCreated;
|
||||||
if (!regionUpdateFiles.monthUpdates.isEmpty()) {
|
if (!regionUpdateFiles.monthUpdates.isEmpty()) {
|
||||||
|
@ -93,7 +94,8 @@ public class IncrementalChangesManager {
|
||||||
RegionUpdate monthRu = regionUpdateFiles.monthUpdates.get(month);
|
RegionUpdate monthRu = regionUpdateFiles.monthUpdates.get(month);
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
RegionUpdate ru = it.next();
|
RegionUpdate ru = it.next();
|
||||||
if (ru.obfCreated < dateCreated || (monthRu != null && ru.obfCreated < monthRu.obfCreated)) {
|
if (ru.obfCreated < dateCreated ||
|
||||||
|
(monthRu != null && ru.obfCreated < monthRu.obfCreated)) {
|
||||||
log.info("Delete overlapping day update " + ru.file.getName());
|
log.info("Delete overlapping day update " + ru.file.getName());
|
||||||
resourceManager.closeFile(ru.file.getName());
|
resourceManager.closeFile(ru.file.getName());
|
||||||
it.remove();
|
it.remove();
|
||||||
|
@ -113,10 +115,11 @@ public class IncrementalChangesManager {
|
||||||
}
|
}
|
||||||
String nm = index.substring(0, index.length() - 9);
|
String nm = index.substring(0, index.length() - 9);
|
||||||
String date = index.substring(index.length() - 9 + 1);
|
String date = index.substring(index.length() - 9 + 1);
|
||||||
if(!regions.containsKey(nm)) {
|
|
||||||
regions.put(nm, new RegionUpdateFiles(nm));
|
|
||||||
}
|
|
||||||
RegionUpdateFiles regionUpdateFiles = regions.get(nm);
|
RegionUpdateFiles regionUpdateFiles = regions.get(nm);
|
||||||
|
if(regionUpdateFiles == null) {
|
||||||
|
regionUpdateFiles = new RegionUpdateFiles(nm);
|
||||||
|
regions.put(nm, regionUpdateFiles);
|
||||||
|
}
|
||||||
return regionUpdateFiles.addUpdate(date, f, dateCreated);
|
return regionUpdateFiles.addUpdate(date, f, dateCreated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue