From 2f47ee9a259a73168fa59dbe73ffebc3372fc87c Mon Sep 17 00:00:00 2001 From: Badrish Chandramouli Date: Sat, 11 Dec 2021 18:52:26 -0800 Subject: [PATCH 1/5] Fixing warnings. --- azure-pipelines-full.yml | 12 ++++++------ azure-pipelines.yml | 12 ++++++------ cc/CMakeLists.txt | 4 ++-- cs/playground/TstRunner/Program.cs | 17 ++++++++++++++++- cs/test/TestUtils.cs | 4 ++-- 5 files changed, 32 insertions(+), 17 deletions(-) diff --git a/azure-pipelines-full.yml b/azure-pipelines-full.yml index 8877af88b..7852451a1 100644 --- a/azure-pipelines-full.yml +++ b/azure-pipelines-full.yml @@ -62,7 +62,7 @@ jobs: - job: 'cppWindows' pool: - vmImage: vs2017-win2016 + vmImage: windows-latest displayName: 'C++ (Windows)' strategy: @@ -77,10 +77,10 @@ jobs: steps: - task: CMake@1 - displayName: 'CMake .. -G"Visual Studio 15 2017 Win64"' + displayName: 'CMake .. -G"Visual Studio 16 2019"' inputs: workingDirectory: 'cc/build' - cmakeArgs: '.. -G"Visual Studio 15 2017 Win64"' + cmakeArgs: '.. -G"Visual Studio 16 2019"' - task: MSBuild@1 displayName: 'Build solution cc/build/FASTER.sln' @@ -157,7 +157,7 @@ jobs: # - job: 'cppBlobsWindows' # pool: -# vmImage: vs2017-win2016 +# vmImage: windows-latest # displayName: 'C++ Blobs (Windows)' # strategy: @@ -172,10 +172,10 @@ jobs: # steps: # - task: CMake@1 -# displayName: 'CMake .. -G"Visual Studio 15 2017 Win64" -DUSE_BLOBS=ON' +# displayName: 'CMake .. -G"Visual Studio 16 2019" -DUSE_BLOBS=ON' # inputs: # workingDirectory: 'cc/build' -# cmakeArgs: '.. -G"Visual Studio 15 2017 Win64" -DUSE_BLOBS=ON' +# cmakeArgs: '.. -G"Visual Studio 16 2019" -DUSE_BLOBS=ON' # - script: 'git clone https://github.com/microsoft/vcpkg' # workingDirectory: 'cc/build' diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 90c5d83f2..739782cb4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -62,7 +62,7 @@ jobs: - job: 'cppWindows' pool: - vmImage: vs2017-win2016 + vmImage: windows-latest displayName: 'C++ (Windows)' strategy: @@ -77,10 +77,10 @@ jobs: steps: - task: CMake@1 - displayName: 'CMake .. -G"Visual Studio 15 2017 Win64"' + displayName: 'CMake .. -G"Visual Studio 16 2019"' inputs: workingDirectory: 'cc/build' - cmakeArgs: '.. -G"Visual Studio 15 2017 Win64"' + cmakeArgs: '.. -G"Visual Studio 16 2019"' - task: MSBuild@1 displayName: 'Build solution cc/build/FASTER.sln' @@ -163,7 +163,7 @@ jobs: # - job: 'cppBlobsWindows' # pool: -# vmImage: vs2017-win2016 +# vmImage: windows-latest # displayName: 'C++ Blobs (Windows)' # strategy: @@ -178,10 +178,10 @@ jobs: # steps: # - task: CMake@1 -# displayName: 'CMake .. -G"Visual Studio 15 2017 Win64" -DUSE_BLOBS=ON' +# displayName: 'CMake .. -G"Visual Studio 16 2019" -DUSE_BLOBS=ON' # inputs: # workingDirectory: 'cc/build' -# cmakeArgs: '.. -G"Visual Studio 15 2017 Win64" -DUSE_BLOBS=ON' +# cmakeArgs: '.. -G"Visual Studio 16 2019" -DUSE_BLOBS=ON' # - script: 'git clone https://github.com/microsoft/vcpkg' # workingDirectory: 'cc/build' diff --git a/cc/CMakeLists.txt b/cc/CMakeLists.txt index 4f92318b6..246f581c2 100644 --- a/cc/CMakeLists.txt +++ b/cc/CMakeLists.txt @@ -20,8 +20,8 @@ if (MSVC) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /RTC1 /MDd") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2 /Oi /Gy- /MD") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG /OPT:REF /OPT:NOICF /INCREMENTAL:NO") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG /OPT:REF /OPT:NOICF /INCREMENTAL:NO") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG /OPT:REF /OPT:NOICF") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG /OPT:REF /OPT:NOICF") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") diff --git a/cs/playground/TstRunner/Program.cs b/cs/playground/TstRunner/Program.cs index 6a85bd932..3e12110d6 100644 --- a/cs/playground/TstRunner/Program.cs +++ b/cs/playground/TstRunner/Program.cs @@ -3,6 +3,7 @@ using FASTER.core; using FASTER.test.recovery.objects; +using System; namespace TstRunner { @@ -10,10 +11,24 @@ public class Program { public static void Main() { + + for (int i = 0; i < 10000; i++) + { + var device = Devices.CreateLogDevice("d:/test"); + var log = new FasterKV(1024, new LogSettings { LogDevice = device }); + log.Dispose(); + device.Dispose(); + } + + + GC.Collect(); + GC.WaitForFullGCComplete(); + + /* var test = new ObjectRecoveryTests2(); test.Setup(); test.ObjectRecoveryTest2(CheckpointType.Snapshot, 400, false).GetAwaiter().GetResult(); - test.TearDown(); + test.TearDown();*/ } } } diff --git a/cs/test/TestUtils.cs b/cs/test/TestUtils.cs index 7f875b451..73e130cb1 100644 --- a/cs/test/TestUtils.cs +++ b/cs/test/TestUtils.cs @@ -109,13 +109,13 @@ public enum DeviceType bool preallocateFile = false; long capacity = -1; // Capacity unspecified bool recoverDevice = false; - bool useIoCompletionPort = false; - bool disableFileBuffering = true; switch (testDeviceType) { #if WINDOWS case DeviceType.LSD: + bool useIoCompletionPort = false; + bool disableFileBuffering = true; #if NETSTANDARD || NET if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) // avoids CA1416 // Validate platform compatibility #endif From 6dfbc31688a62a3d894ced85f64b3fe8b68186fe Mon Sep 17 00:00:00 2001 From: Badrish Chandramouli Date: Sat, 11 Dec 2021 18:56:57 -0800 Subject: [PATCH 2/5] undo unrelated change --- cs/playground/TstRunner/Program.cs | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/cs/playground/TstRunner/Program.cs b/cs/playground/TstRunner/Program.cs index 3e12110d6..f6a408fd5 100644 --- a/cs/playground/TstRunner/Program.cs +++ b/cs/playground/TstRunner/Program.cs @@ -3,7 +3,6 @@ using FASTER.core; using FASTER.test.recovery.objects; -using System; namespace TstRunner { @@ -11,24 +10,10 @@ public class Program { public static void Main() { - - for (int i = 0; i < 10000; i++) - { - var device = Devices.CreateLogDevice("d:/test"); - var log = new FasterKV(1024, new LogSettings { LogDevice = device }); - log.Dispose(); - device.Dispose(); - } - - - GC.Collect(); - GC.WaitForFullGCComplete(); - - /* var test = new ObjectRecoveryTests2(); test.Setup(); test.ObjectRecoveryTest2(CheckpointType.Snapshot, 400, false).GetAwaiter().GetResult(); - test.TearDown();*/ + test.TearDown(); } } -} +} \ No newline at end of file From 9e9697e96646a14574b72aa4cc7c313ff2efa959 Mon Sep 17 00:00:00 2001 From: Badrish Chandramouli Date: Sat, 11 Dec 2021 19:10:32 -0800 Subject: [PATCH 3/5] fix --- cc/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cc/CMakeLists.txt b/cc/CMakeLists.txt index 246f581c2..43807fb1c 100644 --- a/cc/CMakeLists.txt +++ b/cc/CMakeLists.txt @@ -20,8 +20,8 @@ if (MSVC) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /RTC1 /MDd") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2 /Oi /Gy- /MD") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG /OPT:REF /OPT:NOICF") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG /OPT:REF /OPT:NOICF") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG /INCREMENTAL:NO /OPT:REF /OPT:NOICF") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG /INCREMENTAL:NO /OPT:REF /OPT:NOICF") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") From be024201bdfa049cac7b47021d2dc6082fb1db91 Mon Sep 17 00:00:00 2001 From: Badrish Chandramouli Date: Sat, 11 Dec 2021 19:18:23 -0800 Subject: [PATCH 4/5] fix2 --- cc/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cc/CMakeLists.txt b/cc/CMakeLists.txt index 43807fb1c..15d165af5 100644 --- a/cc/CMakeLists.txt +++ b/cc/CMakeLists.txt @@ -20,8 +20,8 @@ if (MSVC) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /RTC1 /MDd") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2 /Oi /Gy- /MD") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG /INCREMENTAL:NO /OPT:REF /OPT:NOICF") - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG /INCREMENTAL:NO /OPT:REF /OPT:NOICF") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG /OPT:NOICF") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG /OPT:NOICF") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") From 1a7519e3795ba8e67a6af6e6728815b2acb0dec5 Mon Sep 17 00:00:00 2001 From: Badrish Chandramouli Date: Sat, 11 Dec 2021 19:23:43 -0800 Subject: [PATCH 5/5] nit --- cs/playground/TstRunner/Program.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cs/playground/TstRunner/Program.cs b/cs/playground/TstRunner/Program.cs index f6a408fd5..6a85bd932 100644 --- a/cs/playground/TstRunner/Program.cs +++ b/cs/playground/TstRunner/Program.cs @@ -16,4 +16,4 @@ public static void Main() test.TearDown(); } } -} \ No newline at end of file +}