bbfsdev / bbfs

Big brother file system (distributed file system)
14 stars 5 forks source link

Issue 237 monitor dir rename #242

Closed yarondbb closed 10 years ago

yarondbb commented 10 years ago

Summary of solution for this branch: User flow:

  1. Stop the application
  2. Run Do manual changes in monitoring directories (any change)
  3. Run the application with new flag: manual_file_change=true
  4. Application should provide new content data file with the manual changes (without doing any indexing), and exit
  5. Run application again with new flag: manual_file_change=false (default calue). Application will load the uchanged content data file and continue

Alogorithm for step 3: load content data with new flag: 'manual_file_change' During load the application will builld new map: file,size,mod --> [checksum, uniqu] If key found more then 1 time,then uniqu become false. This will indicate not to do anything with it during manual change

monitoring new behavior: existing files in Application Tree - ignore new found files in OS system: If not exist in map - need to be indexed. skip (will be handled in step 5. If exist in map (copied or moved): if uniqu is true - take the original checksum and add to ContentData if uniqu is false - need to be indexed. skip. will be handled in step 5. unmarked files (non existing) - will have legacy behavior and be remove from content data Write new content data to file Exit the application

bbfsdev commented 10 years ago

Good job!

yarondbb commented 10 years ago

@kolmanv, note that Genady already reviewd file: lib/content_data/content_data.rb (in issue #243). I merged 243 branch to this branch, since 'adding index time' feature is also part of this feature (monitoring manual changes)