Skip to content
This repository has been archived by the owner on Mar 9, 2019. It is now read-only.

add WriteToFlag to Tx #454

Merged
merged 1 commit into from
Nov 6, 2015
Merged

add WriteToFlag to Tx #454

merged 1 commit into from
Nov 6, 2015

Conversation

xiang90
Copy link
Contributor

@xiang90 xiang90 commented Nov 6, 2015

For in memory workload, it does not make sense to use
o_direct to copy the file. Adding a option to clear out
o_direct and for other future cases.

//
// If open file fails with the given flag, WriteTo will fail
// back to use empty flag.
WriteToFlag int
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change the name to WriteFlag? The interface is WriterTo but this flag would apply to other write methods if they were added later.

For in memory workload, it does not make sense to use
o_direct to copy the file. Adding a option to clear out
o_direct and for other future cases.
@xiang90
Copy link
Contributor Author

xiang90 commented Nov 6, 2015

@benbjohnson All fixed. PTAL.

@benbjohnson
Copy link
Member

👍 I made some doc changes and minor clean up in 6b1bbf0 as well.

@benbjohnson
Copy link
Member

/cc @mkobetic This removes O_DIRECT as the default. You probably want to add it back in RDB with:

tx.WriteFlags = syscall.O_DIRECT

before it calls to Tx.WriteTo() for the backup.

@xiang90 xiang90 deleted the tx_write branch November 6, 2015 20:37
@xiang90
Copy link
Contributor Author

xiang90 commented Nov 6, 2015

@benbjohnson Thank you!

@mkobetic
Copy link
Contributor

mkobetic commented Nov 9, 2015

Thanks @benbjohnson, I made an issue to remind us when we update.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants