Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added check on Atime on item to condition * WIP nested if to check Atime * Revert "WIP nested if to check Atime" This reverts commit 6391dd5. * Revert "Added check on Atime on item to condition" This reverts commit ee3d7ad. * added debug lines in Read() and Write() * WIP Moved file_cache : Openfile call to Read() and Write() * WIP Removed open() call in Write(). Troubleshooting file interface lag and write issues. * Revert "WIP Removed open() call in Write(). Troubleshooting file interface lag and write issues." This reverts commit bd0b50b. * Revert "WIP Moved file_cache : Openfile call to Read() and Write()" This reverts commit 8483de9. * modified ReadInBuffer() to recieve handleID and load handleID * Revert "modified ReadInBuffer() to recieve handleID and load handleID" This reverts commit dc3640d. * set up download() and getHandleData() * added call to getHandleData() from ReadInBuffer() * added call to getHandleData() in WriteFile() * removed redundant fileObj nil check * added additional handlemap.Handle var to replace options.Handle for ReadInBuffer() * added additional handlemap.Handle var to replace options.Handle for WriteFile() * updated println() into log.Err and log.Debug * -changed test to call DownloadFile() -exported download() to DownlaodFile() for tests -added isDownloadRequired logic in TruncateFile() * added DownloadFileOptions struct and adjusted function parameters and calls respectively * chanced condition to be more specific for new handle produced by OpenFile() * get handle out of download in TruncateFile() to fix test * adjusted TestSyncFile(), WriteFile(), and ReadInBuffer() to hold flag sync state * Added handle storing and retrieval in TestReadFileWithRefresh() * added sync.mutex thread safe logic into getHandleData() * added download logic into ReadFile() * removed download portion of ReadFile() * -removed extra handle being used to swap into handlemap -added handle option in DownloadFileOptions -fixed all references to DownloadFile() to include handle in options. * used sync.RWMutex from handle to lock and unlock handle instead of file cache. * -moved getHandleData() logic into DownloadFile() -removed DownloadFile() flag and mode parameters * -moved download logic into a downloadRequired conditional -removed syscall.EACCES error check * -used OpenFile() instead of creating a new handle direclty -changed conditional to check if handle has value "flag" signifying that it is new and empty. * added error handle to OpenFile() call in TruncateFile() * fixed parameters calling DownloadFile() * -set default values for flag and mode for DownloadFile() -removed handlemap loading from test * added another 12 second wait for file to expire in TestReadFileWithRefresh() * put os.O_RDWR back into OpenFile() call in TruncateFile() to allow FlushFile()'s f.Sync() call to succeed * moved fileExists assigned from isDownloadRequired() in DownlaodFile() * added error handle in WriteFile() * spell correction on error string * Added isDownloadNeeded value in handle and adjusted download conditionals respectively * removed redundant code from OpenFile(). * condensed values in handle into a single value. changed conditions checking for this one value. * fix typo in DownlaodFile() log * renamed rename flagModeStruct to openFileOptions in DownloadFile() * renamed flag to flags in DownloadFile() * removed DownloadFileOptions struct. refactored all function calls * adjusted function call parameters in tests for DownloadFile() * commented out debug log for Read() and Write() * replaced value adjustment of handle with removing single fileFlagMode value at the end of DownloadFile() * renamed flag to flags for value struct set in OpenFile() * renamed flag to flags in type assertion in DownloadFile() * moved openFileOptions to it's own defined struct and refactored code respecively. * unexported DownloadFile() and is now downloadFile() * WIP add downloadFile() call after openFile In tests to resolve pipeline * removed var redefine for handle in TruncateFile() * removed handle redefine assignment for downloadFile() call in ReadInBuffer() and WriteFile() * add downlaodFile() after OpenFile() in TestRenameFileInCache() * added error check to downloadFile() call in TestRenameFileAndCacheCleanupWithNoTimeout() * Added downloadFile() call to test with error handle. * cleaned up empty lines * removed handlemap.Handle return from downloadFile * adjusted type assertion to maintain consistent style * changed "fileFlagMode" key to "openFileOptions" for value in handle * deleted fileCacheStatsCollector from OpenFile * corrected comment in TruncateFile * corrected return type var assignment in TestChownInCache() * added value check for handle in CloseFile() * fixed var assignemnts when calling downloadFile * adjsuted var assignements when calling downloadFile * changed commment and removed akward wording * moved handle lock into downloadFile * move handle value check further up CloseFile * remove var err error declarations from ReadInBuffer and WriteFile * changed "FileCache::download" in erro stiring to "FileCache::downloadFile" * removed "for' from error message in ReadInBuffer * adjusted Error log to reflect function called * put the TestFileCacheTestSuite back in file_cache_test.go * put ReadFile() call back in place for TestReadFile() * adjusted assertions for handle not being nil in TestHardLimitOnSize * removed comments in test code * Moved hard limit check from downloadFile to OpenFile * Added ReadFile calls and respecitve asserts in tests. * removed extra ReadFile and download calls in tests and added download to ReadFile function * added error check for ReadFile
- Loading branch information