| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |\
| | | | |
| | | | | |
WT-2522: Incorrect format code in message
|
| | | |/
| | | |
| | | |
| | | | |
Use "%lu" to print the DWORD, it's a 32-bit "unsigned long".
|
| | | |\
| | | |/
| | |/| |
|
| | |\ \
| | | | |
| | | | | |
WT-2512 - Change how wtperf throttle values per thread are calculated
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
../src/os_posix/os_fs.c: In function '__posix_directory_sync':
../src/os_posix/os_fs.c:83:10: error: 'tret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
int fd, tret;
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Multiple block structures can share the same file handle. So
saving the map handle into the WT_FH structure means we overwrite
it each time we memory map a region from a different btree.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Rename __wt_win32_errno() to be __wt_getlasterror() to match Windows
naming convention.
Rework dynamic library load/unload routines to fix final return value,
it shouldn't be just a negation of the Windows failure.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Whitespace.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Fix a typo.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Update __win_handle_sync() to handle WT_FH structures without open handles,
allows removal of the __linux__ #ifdef from __wt_directory_sync_fh subt.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
warning C4098: '__wt_stream_set_line_buffer': 'void' function returning
a value
|
| | | | |
| | | | |
| | | | |
| | | | | |
We ignored it in most places before, but not all.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Instead of setting share-mode argument for readonly access to
CreateFileA, omit GENERIC_WRITE from the desired-access argument, and
leave the shared-mode argument as FILE_SHARE_READ | FILE_SHARE_WRITE in
all cases.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In commit 45aa438, I moved the wt utility code that does hot backup
copies from the wt utility into the WiredTiger library, and that's
failing on Windows.
Previously, the wt utility called "open" get a readonly file descriptor
on the object to be copied. When I moved that code into the library, I
changed it to call __wt_open (and eventually the Windows library call
CreateFileA), but still opening readonly.
With that change, the txn04 test started failing:
test_txn04.test_txn04.test_ops(t1c.remove.row): :
.\./WiredTigerLog.0000000002: handle-open: CreateFileA: The
process cannot access the file because it is being used by
another process.
The problem is the hot backup open of a readonly handle has a different
shared-mode than the WiredTiger existing handle, and that fails.
One workaround/fix is to open the files read/write when doing a copy,
because then the CreateFileA open has the same shared-mode as the
existing handle in WiredTiger. Of course, that breaks if we're ever
copying a file that's currently open readonly in WiredTiger.
The change I'm doing instead is to not pass in the absolute path of the
file to be copied, instead, pass in the name of the file. Then, when we
open it to copy it, if the file is currently open, the backup won't open
a new file handle, so there won't be any collision. If the file isn't
currently open, there obviously won't be any collision.
The failure mode here is if WiredTiger attempts to open a file in
read/write mode, while the readonly backup copy handle is open, then
the WiredTiger thread will see the collision.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Handle a not-supported return from mmap preload when the read path is the
place where we first attempt to preload.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Do verbose configuration early, with error configuration, so we output
all the messages the application wants.
|
| | | | |
| | | | |
| | | | |
| | | | | |
CreateFileMappingA returns a NULL on error, not INVALID_HANDLE_VALUE.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Prettify the verbose output when a handle is opened.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Remove the "posix" and "win" parts of the os_posix and os_win FS code
file names, it's no longer needed.
KNF fix for a long line.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Windows was leaking handles: if we open a stream with stdio, close it
with fclose; my reading of the MSVC documentation is fclose will close
the underlying handles returned by _open_osfhandle and CreateFileA.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Now the mmap functions are methods off the WT_FH handle, their verbose
messges should be HANDLEOPS, not FILEOPS.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
MSVC doesn't support line-buffering, it's the same as full-buffering.
Turn on no-buffering instead.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Whitespace, re-position a comment for clarity.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Create os_common, move common OS functions there.
Add "fs" to the file names of files that contain a version of the file
system APIs.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Add WiredTiger helper functions set set line buffering and turn off
buffering (wrappers for setvbuf), then add style tests so we never call
setvbuf directly, to avoid re-introducing the problems in WT-2517.
Add a new WiredTiger open-handle flag, WT_STREAM_LINE_BUFFER, which
allows the Btree debug code to set line-buffering on its debug stream.
|
| | | | |\
| | | |_|/
| | |/| | |
|
| | |\ \ \
| | | |/ /
| | |/| | |
WT-2517: wtperf uses setvbuf in a way that isn't supported on Windows
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Increase the line-buffer size for the monitor and stdout streams from
32B to 1024B; I don't understand why a 32B buffer would ever be useful.
|
| | |/ /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
MSVC doesn't support a buffer size of 0 to setvbuf. The MSVC documentation
says "Buffer size in bytes. Allowable range: 2 <= size <= INT_MAX (2147483647).
Internally, the value supplied for size is rounded down to the nearest
multiple of 2."
|
| | | |
| | | |
| | | |
| | | | |
Make the 4 mmap functions methods off the WT_FH handle.
|
| | | |
| | | |
| | | |
| | | | |
Reviewer request, add a comment.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Remove the temporary file as well, if it exists. We're opening it
exclusively and if there's a leftover file, backup might fail.
|
| | | |\
| | | | |
| | | | | |
WT-2330: in-memory configurations should not create on-disk collection files
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The wt utility isn't syncing the enclosing directory on a backup file
which leaves us potentially vulnerable on a crash on Linux. WiredTiger
knows how to do the magic, so use a WiredTiger function to do the backup
file copy. This also gets rid of some Windows-specific code in the wt
utility.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
error: passing argument 3 of '__wt_filename' from incompatible pointer
type [-Werror=incompatible-pointer-types]
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Move the full open path creation out of the platform-specific code into the
top-level generic open code, it's simpler that way and the platforms don't
need the details.
Minor simplification of the read-only code and asserts.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When running in-memory, don't read/write the file descriptor's structure,
at 4KB each, a large number of collections can take up significant amounts
of memory.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Group all WT_BLOCK configuration together.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Don't open a secondary file handle for read-only files: it's not needed
(the secondary handle is only used for file truncation), and second, the
attempt will fail.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Make all of the memory-map error/verbose messages standard.
Don't compare the return of CreateFileMappingA against NULL.
Even if UnmapViewOfFile() fails, still close the file handle.
Save the error value before calling another MSVC funtion that might
clear it.
|
| | | |/
| | | |
| | | |
| | | |
| | | | |
We should no longer need to #ifdef __wt_posix_fadvise, all of its callers
now handle ENOTSUP returns, so we won't repeatedly call it to no purpose.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Remove HAVE_SYNC_FILE_RANGE #ifdef from the block manager and support
ENOTSUP returns up the stack from any underlying asynchronous flush
call. General reworking of block manager's sync code to ignore further
calls whenever ENOTSUP is returned on a handle.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Move the Windows mapping handle from the block-manager handle into the WT_FH
handle, private to Windows.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
I flipped the sense of a test in the posix_madvise code, and got it
wrong, fix it.
|
| | | |
| | | |
| | | |
| | | | |
ISO C90 forbids mixed declarations and code
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Remove Linux-specific preload and memory-mapping code from the block
manager.
Get rid of the block-manager calls to posix_fadvise(), support ENOTSUP
returns up the stack from the underlying support. General reworking of
block preload/discard code to stop attempts whenever ENOTSUP is return
on a handle.
Remove block manager handle open tests of cache-max and dirty-cache-max
configuration conflicts with specifying direct I/O, lacking posix_fadvise
and lacking sync_file_range. We can't know in the block manager what the
underlying layer can do, and also, the old code was wrong, direct I/O is
set on a file type basis, so testing against a specific handle open isn't
correct.
Inline the block-header-size function, we call it a lot and it's simply
returning a size.
|